<s> from __future__ import absolute_import <EOL> from django . test import TestCase <EOL> from . models import Person <EOL> class ChoicesTests ( TestCase ) : <EOL> def test_display ( self ) : <EOL> a = Person . objects . create ( name = '<STR_LIT>' , gender = '<STR_LIT:M>' ) <EOL> s = Person . objects . create ( name = '<STR_LIT>' , gender = '<STR_LIT:F>' ) <EOL> self . assertEqual ( a . gender , '<STR_LIT:M>' ) <EOL> self . assertEqual ( s . gender , '<STR_LIT:F>' ) <EOL> self . assertEqual ( a . get_gender_display ( ) , '<STR_LIT>' ) <EOL> self . assertEqual ( s . get_gender_display ( ) , '<STR_LIT>' ) <EOL> a . gender = '<STR_LIT>' <EOL> self . assertEqual ( a . get_gender_display ( ) , '<STR_LIT>' ) <EOL> a . gender = '<STR_LIT>' <EOL> self . assertEqual ( a . get_gender_display ( ) , '<STR_LIT>' ) </s>
