From a9fc72724047fcdfe876ffcef7e74352c3d9230a Mon Sep 17 00:00:00 2001 From: Nicholas Charriere Date: Mon, 18 Jul 2016 13:36:06 -0700 Subject: [PATCH] Fix tests --- tests.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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'):