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)
def test_backend(self): """ Verify the BadgeClass fetches the backend properly. """ assert isinstance(BadgeClass().backend, DummyBackend)