pokeapi/pokemon_v2/test_models.py
2015-09-05 21:22:06 -04:00

16 lines
390 B
Python

from __future__ import unicode_literals
from django.test import TestCase
from pokemon_v2.models import *
class AbilityTestCase(TestCase):
def setUp(self):
Ability.objects.create(
name = "Smell",
generation_id = 3,
is_main_series = true
)
def fields_are_valid(self):
smell = Ability.objects.get(name="Smell")
self.assertEqual(smell.generation_id, 3)