-
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.
- Loading branch information
1 parent
49fd1c7
commit 287917d
Showing
5 changed files
with
19 additions
and
17 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
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,16 @@ | ||
from django.test import TestCase | ||
from api.models.gebruiker import Gebruiker | ||
from django.contrib.auth.models import User | ||
|
||
class GebruikerTestCase(TestCase): | ||
def setUp(self): | ||
user1 = User.objects.create_user(username='user1') | ||
user2 = User.objects.create_user(username='user2') | ||
Gebruiker.objects.create(user=user1, is_lesgever=False) | ||
Gebruiker.objects.create(user=user2, is_lesgever=True) | ||
|
||
def test_gebruiker_is_lesgever(self): | ||
user1 = Gebruiker.objects.get(user__username='user1') | ||
user2 = Gebruiker.objects.get(user__username='user2') | ||
self.assertEqual(user1.is_lesgever, False) | ||
self.assertEqual(user2.is_lesgever, True) |
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,9 +1,10 @@ | ||
from django.test import TestCase | ||
''' from django.test import TestCase | ||
from django.urls import reverse | ||
class TestViews(TestCase): | ||
def test_should_show_register_page(self): | ||
print('nigger') | ||
#self.client.get(reverse('register')) | ||
#self.assertEqual(response.status_code, 200) | ||
#self.assertTemplateUsed(response, "authentication/register") | ||
self.assertTrue(True) | ||
self.assertTrue(True) ''' |