-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unittest: account controller - url_test (resolve)
- Loading branch information
janik
committed
Aug 14, 2024
1 parent
8703569
commit 64f7b21
Showing
14 changed files
with
63 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule publish
updated
14 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from django.test import SimpleTestCase | ||
from django.urls import reverse, resolve | ||
from account_controller.views import AccountView | ||
|
||
class TestUrls(SimpleTestCase): | ||
def test_add_url_is_resolved(self): | ||
url = reverse('add') | ||
print(resolve(url)) | ||
self.assertEquals(resolve(url).func, AccountView.manage_accounts) | ||
|
||
def test_delete_url_is_resolved(self): | ||
url = reverse('delete') | ||
print(resolve(url)) | ||
self.assertEquals(resolve(url).func, AccountView.remove_admin) | ||
|
||
def test_login_url_is_resolved(self): | ||
url = reverse('login') | ||
print(resolve(url)) | ||
self.assertEquals(resolve(url).func, AccountView.authenticate) | ||
|
||
def test_logout_url_is_resolved(self): | ||
url = reverse('logout') | ||
print(resolve(url)) | ||
self.assertEquals(resolve(url).func, AccountView.logout) | ||
|
||
def test_auth_url_is_resolved(self): | ||
url = reverse('auth') | ||
print(resolve(url)) | ||
self.assertEquals(resolve(url).func, AccountView.authenticate_callback) | ||
|
||
def test_denied_url_is_resolved(self): | ||
url = reverse('denied') | ||
print(resolve(url)) | ||
self.assertEquals(resolve(url).func, AccountView.denied) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Ignore test outputs | ||
# Ignore tests outputs | ||
|
||
sandbox/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters