"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "cloudkitty/tests/api/v2/dataframes/test_dataframes.py" between
cloudkitty-12.1.0.tar.gz and cloudkitty-13.0.0.tar.gz

About: OpenStack CloudKitty provides Rating-as-a-Service for OpenStack.
The "Victoria" series (latest release).

test_dataframes.py  (cloudkitty-12.1.0):test_dataframes.py  (cloudkitty-13.0.0)
skipping to change at line 15 skipping to change at line 15
# a copy of the License at # a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # http://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, software # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
# #
import unittest from unittest import mock
import mock
from cloudkitty.api.v2.dataframes import dataframes from cloudkitty.api.v2.dataframes import dataframes
from cloudkitty import tests
from cloudkitty.utils import tz as tzutils from cloudkitty.utils import tz as tzutils
class TestDataframeListEndpoint(unittest.TestCase): class TestDataframeListEndpoint(tests.TestCase):
def setUp(self): def setUp(self):
super(TestDataframeListEndpoint, self).setUp() super(TestDataframeListEndpoint, self).setUp()
self.endpoint = dataframes.DataFrameList() self.endpoint = dataframes.DataFrameList()
def test_non_admin_request_is_filtered_on_project_id(self): def test_non_admin_request_is_filtered_on_project_id(self):
policy_mock = mock.patch('cloudkitty.common.policy.authorize') policy_mock = mock.patch('cloudkitty.common.policy.authorize')
with mock.patch.object(self.endpoint._storage, 'retrieve') as ret_mock: with mock.patch.object(self.endpoint._storage, 'retrieve') as ret_mock:
with policy_mock, mock.patch('flask.request') as fmock: with policy_mock, mock.patch('flask.request') as fmock:
ret_mock.return_value = {'total': 42, 'dataframes': []} ret_mock.return_value = {'total': 42, 'dataframes': []}
 End of changes. 3 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)