def test_conflict_error_should_report_line_numbers(): config = morepath.setup() config.scan(conflicterror) with pytest.raises(ConflictError) as e: config.commit() v = text_type(e.value) assert 'line 8' in v assert 'line 15' in v
def test_conflict_error_should_report_line_numbers(): with pytest.raises(ConflictError) as e: dectate.commit(conflicterror.App) v = text_type(e.value) assert 'line 8' in v assert 'line 15' in v
def default(self, request): obj = request.resolve_path('p', app=request.app.child('sub')) return text_type(isinstance(obj, SubModel))
def extra(self, request): return text_type(request.resolve_path('nonexistent') is None)
def default(self, request): return text_type(isinstance(request.resolve_path('simple'), Model))