def METHOD_NAME(self):
    with pytest.raises(ValidationError) as excinfo:
        self.translation.custom_prefix = "/prefix/"
        self.translation.clean()
    self.assertEqual(excinfo.value.code, "invalid_project")
    with pytest.raises(ValidationError) as excinfo:
        self.subproject_translation.custom_prefix = "/prefix/"
        self.subproject_translation.clean()
    self.assertEqual(excinfo.value.code, "invalid_project")