コード例 #1
0
ファイル: tests.py プロジェクト: thinkt4nk/django-data-schema
    def test_alphabetical(self):
        choices = FieldSchemaType.choices()

        sorted_choices = copy(choices)
        sorted_choices.sort()

        self.assertListEqual(choices, sorted_choices)
コード例 #2
0
ファイル: tests.py プロジェクト: thinkt4nk/django-data-schema
 def test_choices(self):
     expected_choices = set([
         ('DATE', 'DATE'),
         ('DATETIME', 'DATETIME'),
         ('INT', 'INT'),
         ('FLOAT', 'FLOAT'),
         ('STRING', 'STRING'),
         ('BOOLEAN', 'BOOLEAN'),
     ])
     self.assertEquals(expected_choices, set(FieldSchemaType.choices()))