@pytest.mark.parametrize('reserved_code', RESERVED_PROJECT_CODES)
@pytest.mark.django_db
def test_create_project_reserved_code(english, reserved_code):
 with pytest.raises(ValidationError):
  Project(code=reserved_code, fullname='whatever', source_language=english).save()
 reserved_code_with_padding = ('  %s  ' % reserved_code)
 with pytest.raises(ValidationError):
  Project(code=reserved_code_with_padding, fullname='whatever', source_language=english).save()

@ pytest . mark . parametrize ( 'reserved_code' , RESERVED_PROJECT_CODES ) @ pytest . mark . django_db def test_create_project_reserved_code ( english , reserved_code ) : with pytest . raises ( ValidationError ) : Project ( code = reserved_code , fullname = 'whatever' , source_language = english ) . save ( ) reserved_code_with_padding = ( '  %s  ' % reserved_code ) with pytest . raises ( ValidationError ) : Project ( code = reserved_code_with_padding , fullname = 'whatever' , source_language = english ) . save ( )
tests projects are not created with reserved project codes .