From ea85e3f6137e8c75e50d07c4511d294cfd9b23b6 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Sat, 20 Jul 2019 18:07:42 +0200 Subject: Rename Object as APObject --- tests/test_app.py | 2 +- tests/test_memory_store.py | 4 ++-- tests/test_objects.py | 8 ++++---- tests/test_sqlite_store.py | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'tests') diff --git a/tests/test_app.py b/tests/test_app.py index 1f9116b..e8acb01 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -15,7 +15,7 @@ class TestApp(AsyncHTTPTestCase): def test_object_view(self): oid = self.get_url('/object/12345') - obj = objects.Object(ap_id=oid) + obj = objects.APObject(ap_id=oid) self.app.store.add(obj) res = self.fetch('/object/12345') self.assertEqual(res.code, 200) diff --git a/tests/test_memory_store.py b/tests/test_memory_store.py index 56f6185..e6b7f1a 100644 --- a/tests/test_memory_store.py +++ b/tests/test_memory_store.py @@ -8,12 +8,12 @@ class TestMemoryStore(unittest.TestCase): def setUp(self): self.store = memory.Store() self.oid = 'https://test/object/12345' - self.obj = objects.Object(ap_id=self.oid) + self.obj = objects.APObject(ap_id=self.oid) self.store.add(self.obj) def test_add_object(self): oid = 'https://test/object/12345' - obj = objects.Object(ap_id=oid) + obj = objects.APObject(ap_id=oid) self.store.add(obj) self.assertIn(oid, self.store.objects) diff --git a/tests/test_objects.py b/tests/test_objects.py index 4f27424..48dfaf1 100644 --- a/tests/test_objects.py +++ b/tests/test_objects.py @@ -3,19 +3,19 @@ import unittest from pyapd import objects -class TestObjects(unittest.TestCase): +class TestAPObjects(unittest.TestCase): def test_activity_from_json(self): - act = objects.Object.from_jsons('''{ + act = objects.APObject.from_jsons('''{ "id": "http://example.org/123456", "type": "object" }''') - self.assertIsInstance(act, objects.Object) + self.assertIsInstance(act, objects.APObject) self.assertEqual(act.ap_id, 'http://example.org/123456') self.assertEqual(act.ap_type, 'object') def test_activity_to_json(self): - act = objects.Object( + act = objects.APObject( ap_id="http://example.org/123456", ap_type="object", ) diff --git a/tests/test_sqlite_store.py b/tests/test_sqlite_store.py index 70a4b17..7de7658 100644 --- a/tests/test_sqlite_store.py +++ b/tests/test_sqlite_store.py @@ -9,12 +9,12 @@ class TestSqliteStore(unittest.TestCase): self.store = sqlite.Store(file=':memory:') self.store.createdb() self.oid = 'https://test/object/12345' - self.obj = objects.Object(ap_id=self.oid) + self.obj = objects.APObject(ap_id=self.oid) self.store.add(self.obj) def test_add_object(self): oid = 'https://test/object/12345' - obj = objects.Object(ap_id=oid) + obj = objects.APObject(ap_id=oid) self.store.add(obj) # self.assertIn('object', self.store.objects) # self.assertIn(oid, self.store.objects['object']) -- cgit v1.2.3