diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-07-19 12:35:00 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-07-19 12:35:00 +0300 |
commit | 0210856c0249fc6e6709cbaa3c99b7672008d9d5 (patch) | |
tree | 09c1a8ee01534e1a638821071fb28b19f10a4df1 | |
parent | 3b8166577f3869725751280dcacecdb62900b787 (diff) | |
download | qvisqve-0210856c0249fc6e6709cbaa3c99b7672008d9d5.tar.gz |
Add: test for byte strings
-rw-r--r-- | qvarn/objstore_tests.py | 6 | ||||
-rw-r--r-- | without-tests | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/qvarn/objstore_tests.py b/qvarn/objstore_tests.py index 7a55e76..63cf6f0 100644 --- a/qvarn/objstore_tests.py +++ b/qvarn/objstore_tests.py @@ -49,6 +49,12 @@ class ObjectStoreTests(unittest.TestCase): store.create_object(self.obj1, key='1st') self.assertEqual(self.get_all_objects(store), [self.obj1]) + def test_adds_object_with_binary_data(self): + store = self.create_store(key=str) + self.obj1['data'] = bytes(range(0, 256)) + store.create_object(self.obj1, key='1st') + self.assertEqual(self.get_all_objects(store), [self.obj1]) + def test_raises_error_for_surprising_keys(self): store = self.create_store(key=str) with self.assertRaises(qvarn.UnknownKey): diff --git a/without-tests b/without-tests index 03277d8..ec2f550 100644 --- a/without-tests +++ b/without-tests @@ -4,5 +4,5 @@ apifw/http.py apifw/bottleapp.py apifw/apixface.py slog/__init__.py -qvarn-backend.py +qvarnbackend.py qvarn/__init__.py |