Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

from django.test import TestCase 

 

from characters.forms.admin_forms import CharacterAddForm 

from common.models import Type, Fandom 

 

 

class CharacterAddFormTest(TestCase): 

 

def setUp(self): 

self.type = Type.objects.create(name="test_type") 

self.fandom = Fandom.objects.create(name="test_fandom", type=self.type) 

 

def test_valid_form(self): 

""" Create character form """ 

data = {'name_surname': "Testing character", 'fandom': self.fandom.id} 

form = CharacterAddForm(data) 

self.assertTrue(form.is_valid())