Example #1
0
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
Example #2
0
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
Example #3
0
 def default(self, request):
     obj = request.resolve_path('p', app=request.app.child('sub'))
     return text_type(isinstance(obj, SubModel))
Example #4
0
 def extra(self, request):
     return text_type(request.resolve_path('nonexistent') is None)
Example #5
0
 def default(self, request):
     return text_type(isinstance(request.resolve_path('simple'), Model))
Example #6
0
 def default(self, request):
     obj = request.resolve_path('p', app=request.app.child('sub'))
     return text_type(isinstance(obj, SubModel))
Example #7
0
 def extra(self, request):
     return text_type(request.resolve_path('nonexistent') is None)
Example #8
0
 def default(self, request):
     return text_type(isinstance(request.resolve_path('simple'), Model))