diff --git a/ietf/api/tests.py b/ietf/api/tests.py index 0d0d28208..7f2c6c086 100644 --- a/ietf/api/tests.py +++ b/ietf/api/tests.py @@ -29,7 +29,7 @@ class TastypieApiTestCase(ResourceTestCaseMixin, TestCase): name = app_name.split('.',1)[-1] models_path = os.path.join(os.path.dirname(app.__file__), "models.py") if os.path.exists(models_path): - self.apps[name] = app + self.apps[name] = app_name super(TastypieApiTestCase, self).__init__(*args, **kwargs) def test_api_top_level(self): @@ -76,7 +76,8 @@ class TastypieApiTestCase(ResourceTestCaseMixin, TestCase): top = json.loads(r.content) self._assertCallbackReturnsSameJSON("/api/v1", top) for name in self.apps: - app = self.apps[name] + app_name = self.apps[name] + app = import_module(app_name) self.assertEqual("/api/v1/%s/"%name, top[name]["list_endpoint"]) r = client.get(top[name]["list_endpoint"]) self.assertValidJSONResponse(r)