Skip to content

Commit

Permalink
SQLAlchemy changed the way errors are reported at https://bitbucket.o…
Browse files Browse the repository at this point in the history
  • Loading branch information
amol- committed Jul 7, 2015
1 parent 87b545d commit 4e008a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions tests/test_crud_html.py
Expand Up @@ -34,7 +34,8 @@ def test_post_validation_dberror(self):

result = self.app.post('/movies/', params={'title':'Movie Test'})
assert '<form' in result, result
assert '(OperationalError)' in result, result
assert 'no such table: movies' in result, result
assert 'status_alert' in result, result

def test_search(self):
result = self.app.get('/movies/')
Expand Down Expand Up @@ -109,4 +110,4 @@ def test_search_relation_by_text(self):
assert 'First Movie' in result
assert 'Second Movie' in result
assert 'Fifth Movie' not in result
"""
"""
2 changes: 1 addition & 1 deletion tests/test_rest_json.py
Expand Up @@ -37,7 +37,7 @@ def test_post_validation_dberror(self):
metadata.drop_all(tables=[Movie.__table__])

result = self.app.post('/movies', params={'title':'Movie Test'}, status=400)
assert result.json['message'].startswith('(OperationalError)')
assert 'no such table: movies' in result.json['message'], result.text

def test_put(self):
result = self.app.post('/movies', params={'title':'Movie Test'})
Expand Down

0 comments on commit 4e008a3

Please sign in to comment.