pokeapi/pokemon_v2/test_models.py

12 lines
336 B
Python
Raw Permalink Normal View History

2015-09-06 01:22:06 +00:00
from django.test import TestCase
from pokemon_v2.models import *
2016-03-05 11:40:41 +00:00
2015-09-06 01:22:06 +00:00
class AbilityTestCase(TestCase):
2016-03-05 11:40:41 +00:00
def setUp(self):
Ability.objects.create(name="Smell", generation_id=3, is_main_series=True)
2015-09-06 01:22:06 +00:00
2016-03-05 11:40:41 +00:00
def fields_are_valid(self):
smell = Ability.objects.get(name="Smell")
self.assertEqual(smell.generation_id, 3)