@pytest.mark.django_db
def test_format_registry_extensions(no_formats):
 registry = FormatRegistry()
 filetype = registry.register('foo', 'foo')
 filetype2 = registry.register('special_foo', 'foo')
 assert (str(filetype.extension) == 'foo')
 assert (str(filetype2.extension) == 'foo')
 _test_formats(registry, ['foo', 'special_foo'])

@ pytest . mark . django_db def test_format_registry_extensions ( no_formats ) : registry = FormatRegistry ( ) filetype = registry . register ( 'foo' , 'foo' ) filetype2 = registry . register ( 'special_foo' , 'foo' ) assert ( str ( filetype . extension ) == 'foo' ) assert ( str ( filetype2 . extension ) == 'foo' ) _test_formats ( registry , [ 'foo' , 'special_foo' ] )
tests the creation of a file extension .