示例#1
0
 def test_runs_validator(self):
     """
     Verify that the image validator is triggered when cleaning the model.
     """
     pytest.raises(
         ValidationError,
         BadgeClass(slug='test',
                    issuing_component='test2',
                    criteria='test3',
                    description='test4',
                    image=get_image('unbalanced')).full_clean)
示例#2
0
 def test_backend(self):
     """
     Verify the BadgeClass fetches the backend properly.
     """
     assert isinstance(BadgeClass().backend, DummyBackend)