aboutsummaryrefslogtreecommitdiff
path: root/tests/test_objects.py
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2019-04-27 16:19:42 +0200
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2019-04-27 16:19:42 +0200
commite2da18c9f987d8b86f689f2ac716eb7ee41b17c5 (patch)
tree0513a6b11f3a231a10268d909729ff85f442c140 /tests/test_objects.py
parentf0d5701c7cbc07afb46fafaf06bc51354451947b (diff)
Test setting object properties other than id
Diffstat (limited to 'tests/test_objects.py')
-rw-r--r--tests/test_objects.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_objects.py b/tests/test_objects.py
index 4358e41..b21e307 100644
--- a/tests/test_objects.py
+++ b/tests/test_objects.py
@@ -7,14 +7,17 @@ class TestObjects(unittest.TestCase):
def test_activity_from_json(self):
act = objects.Object.from_jsons('''{
- "id": "http://example.org/123456"
+ "id": "http://example.org/123456",
+ "type": "object",
}''')
self.assertIsInstance(act, objects.Object)
self.assertEqual(act.ap_id, 'http://example.org/123456')
+ self.assertEqual(act.ap_type, 'object')
def test_activity_to_json(self):
act = objects.Object(
- id="http://example.org/123456"
+ id="http://example.org/123456",
+ type="object",
)
data = act.to_jsons()
self.assertIsInstance(data, str)