def _get_resource_tester(self, resource_name, resource_fixture):
     expected_klass = getattr(sys.modules["gocardless.resources"], utils.camelize(resource_name))
     with patch.object(self.client, 'api_get'):
         self.client.api_get.return_value = resource_fixture
         obj = getattr(self.client, resource_name)("1")
         self.assertEqual(resource_fixture["id"], obj.id)
         self.assertIsInstance(obj, expected_klass)
 def _get_resource_tester(self, resource_name, resource_fixture):
     expected_klass = getattr(sys.modules["gocardless.resources"], utils.camelize(resource_name))
     with patch.object(self.client, 'api_get'):
         self.client.api_get.return_value = resource_fixture
         obj = getattr(self.client, resource_name)("1")
         self.assertEqual(resource_fixture["id"], obj.id)
         self.assertIsInstance(obj, expected_klass)
Example #3
0
 def test_camelize_multi_word(self):
     teststr = "camelize_this_please"
     expected = "CamelizeThisPlease"
     self.assertEqual(expected, utils.camelize(teststr))
Example #4
0
 def test_camelize_multi_word(self):
     teststr = "camelize_this_please"
     expected = "CamelizeThisPlease"
     self.assertEqual(expected, utils.camelize(teststr))