aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_app.py2
-rw-r--r--tests/test_memory_store.py4
-rw-r--r--tests/test_objects.py4
-rw-r--r--tests/test_sqlite_store.py4
4 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_app.py b/tests/test_app.py
index f78149b..1f9116b 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(id=oid)
+ obj = objects.Object(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 899a776..56f6185 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(id=self.oid)
+ self.obj = objects.Object(ap_id=self.oid)
self.store.add(self.obj)
def test_add_object(self):
oid = 'https://test/object/12345'
- obj = objects.Object(id=oid)
+ obj = objects.Object(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 63228f5..4f27424 100644
--- a/tests/test_objects.py
+++ b/tests/test_objects.py
@@ -16,8 +16,8 @@ class TestObjects(unittest.TestCase):
def test_activity_to_json(self):
act = objects.Object(
- id="http://example.org/123456",
- type="object",
+ ap_id="http://example.org/123456",
+ ap_type="object",
)
data = act.to_jsons()
self.assertIsInstance(data, str)
diff --git a/tests/test_sqlite_store.py b/tests/test_sqlite_store.py
index ea3fef6..70a4b17 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(id=self.oid)
+ self.obj = objects.Object(ap_id=self.oid)
self.store.add(self.obj)
def test_add_object(self):
oid = 'https://test/object/12345'
- obj = objects.Object(id=oid)
+ obj = objects.Object(ap_id=oid)
self.store.add(obj)
# self.assertIn('object', self.store.objects)
# self.assertIn(oid, self.store.objects['object'])