def test12_transformations(self): """ should allow listing transformations """ transformations = api.transformations()["transformations"] self.assertLess(0, len(transformations)) transformation = transformations[0] self.assertIsNotNone(transformation) self.assertIn("used", transformation)
def test12_transformations(self): """ should allow listing transformations """ transformations = api.transformations()["transformations"] transformation = [tr for tr in transformations if tr["name"] == "c_scale,w_100"][0] self.assertIsNotNone(transformation) self.assertIs(transformation["used"], True)
def test12_transformations(self): """ should allow listing transformations """ transformations = api.transformations()["transformations"] transformation = [tr for tr in transformations if tr["name"] == "c_scale,w_100"][0] self.assertIsNotNone(transformation) self.assertIs(transformation["used"], True)
def test12_transformations(self): """ should allow listing transformations """ transformation = [ transformation for transformation in api.transformations()["transformations"] if transformation["name"] == "c_scale,w_100" ][0] self.assertNotEqual(transformation, None) self.assertEqual(transformation["used"], True)
def test12_transformations(self): """ should allow listing transformations """ transformation = [ transformation for transformation in api.transformations()["transformations"] if transformation["name"] == "c_scale,w_100" ][0] self.assertNotEqual(transformation, None) self.assertEqual(transformation["used"], True)
def test_transformations_list_named(self, mocker): """ should allow listing only named transformations""" mocker.return_value = MOCK_RESPONSE api.transformations(named=True) params = mocker.call_args[0][2] self.assertEqual(params['named'], True)