diff --git a/tests.py b/tests.py index 7cdc373..8c0b5a8 100644 --- a/tests.py +++ b/tests.py @@ -1,7 +1,7 @@ import unittest from unittest import TestCase -from werkzeug.exceptions import ClientDisconnected +from werkzeug.exceptions import BadRequest # noinspection PyPep8Naming import snappass.main as snappass @@ -27,17 +27,17 @@ class SnapPassTestCase(TestCase): # Test Bad Data with snappass.app.test_request_context( "/", data={'password': 'foo', 'ttl': 'bar'}, method='POST'): - self.assertRaises(ClientDisconnected, snappass.clean_input) + self.assertRaises(BadRequest, snappass.clean_input) # No Password with snappass.app.test_request_context( "/", method='POST'): - self.assertRaises(ClientDisconnected, snappass.clean_input) + self.assertRaises(BadRequest, snappass.clean_input) # No TTL with snappass.app.test_request_context( "/", data={'password': 'foo'}, method='POST'): - self.assertRaises(ClientDisconnected, snappass.clean_input) + self.assertRaises(BadRequest, snappass.clean_input) with snappass.app.test_request_context( "/", data={'password': 'foo', 'ttl': 'hour'}, method='POST'):