Skip to content

Commit e4035de

Browse files
Aristobulo Menesesjleclanche
authored andcommitted
Application model is swapped, use get_application_model instead.
1 parent 20ec7ba commit e4035de

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/test_application_views.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def tearDown(self):
2626

2727

2828
class TestApplicationRegistrationView(BaseTest):
29+
2930
def test_get_form_class(self):
3031
"""
3132
Tests that the form class returned by the 'get_form_class' method is
@@ -56,7 +57,7 @@ def test_application_registration_user(self):
5657
response = self.client.post(reverse('oauth2_provider:register'), form_data)
5758
self.assertEqual(response.status_code, 302)
5859

59-
app = Application.objects.get(name="Foo app")
60+
app = get_application_model().objects.get(name="Foo app")
6061
self.assertEqual(app.user.username, "foo_user")
6162

6263

@@ -81,7 +82,7 @@ def setUp(self):
8182

8283
def tearDown(self):
8384
super(TestApplicationViews, self).tearDown()
84-
Application.objects.all().delete()
85+
get_application_model().objects.all().delete()
8586

8687
def test_application_list(self):
8788
self.client.login(username="foo_user", password="123456")

0 commit comments

Comments
 (0)