add webpanel/test_models.py as example
This commit is contained in:
parent
98b9574c67
commit
9cec170f62
11
webpanel/test_models.py
Normal file
11
webpanel/test_models.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
from django.test import TestCase
|
||||||
|
from webpanel.models import Game
|
||||||
|
|
||||||
|
class GameTestCase(TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
Game.objects.create(name="Assassin's Creed")
|
||||||
|
|
||||||
|
def test_game_creation(self):
|
||||||
|
assassins = Game.objects.get(name="Assassin's Creed")
|
||||||
|
assert str(assassins) == "Assassin's Creed"
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user