summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/tests/server/test__server_info.py8
-rw-r--r--testing/tests/server/test_session.py5
2 files changed, 10 insertions, 3 deletions
diff --git a/testing/tests/server/test__server_info.py b/testing/tests/server/test__server_info.py
index 80770721..40567ef1 100644
--- a/testing/tests/server/test__server_info.py
+++ b/testing/tests/server/test__server_info.py
@@ -31,9 +31,13 @@ class ServerInfoTestCase(unittest.TestCase):
def test_blobs_enabled(self):
resource = ServerInfo(True)
response = resource.render(DummyRequest(['']))
- self.assertEquals(json.loads(response), {'blobs': True})
+ _info = json.loads(response)
+ self.assertEquals(_info['blobs'], True)
+ self.assertTrue(isinstance(_info['version'], basestring))
def test_blobs_disabled(self):
resource = ServerInfo(False)
response = resource.render(DummyRequest(['']))
- self.assertEquals(json.loads(response), {'blobs': False})
+ _info = json.loads(response)
+ self.assertEquals(_info['blobs'], False)
+ self.assertTrue(isinstance(_info['version'], basestring))
diff --git a/testing/tests/server/test_session.py b/testing/tests/server/test_session.py
index 8131ddb3..b00ab858 100644
--- a/testing/tests/server/test_session.py
+++ b/testing/tests/server/test_session.py
@@ -156,6 +156,7 @@ class SoledadSessionTestCase(unittest.TestCase):
return {}
def decode(self, response, request):
+ print "decode raised"
raise UnexpectedException()
self.wrapper._credentialFactory = BadFactory()
@@ -164,7 +165,9 @@ class SoledadSessionTestCase(unittest.TestCase):
child = getChildForRequest(self.wrapper, request)
request.render(child)
self.assertEqual(request.responseCode, 500)
- self.assertEqual(len(self.flushLoggedErrors(UnexpectedException)), 1)
+ #self.assertEqual(len(self.flushLoggedErrors(UnexpectedException)), 1)
+ errors = self.flushLoggedErrors(UnexpectedException)
+ self.assertEqual(len(errors), 1)
def test_unexpectedLoginError(self):
class UnexpectedException(Exception):