From 41ab9ca30cffb0395405af9fd810467910f5ac2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregor=20Jer=C5=A1e?= Date: Mon, 7 Oct 2024 13:27:14 +0200 Subject: [PATCH] WIP: test info --- tests/functional/resolwe/e2e_resolwe.py | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/functional/resolwe/e2e_resolwe.py b/tests/functional/resolwe/e2e_resolwe.py index f1a1a10d..284610b8 100644 --- a/tests/functional/resolwe/e2e_resolwe.py +++ b/tests/functional/resolwe/e2e_resolwe.py @@ -69,11 +69,37 @@ def test_normal_user(self): def test_admin_user(self): usage_info = self.res.data_usage() + print("Got usage", usage_info) self.assertEqual(len(usage_info), 2) self.assertEqual(set(usage_info[0].keys()), self.expected_fields) def test_ordering(self): usage_info = self.res.data_usage(ordering=["-username"]) + print("Ordering", usage_info) + print("Data") + for d in self.res.data: + print(d.slug, d.contributor) + print("Owners") + print(d.permissions.owners) + print("------") + + print("Sample") + for d in self.res.sample: + print(d.slug, d.contributor) + print("Owners") + print(d.permissions.owners) + print("------") + + print("Collection") + for d in self.res.collection: + print(d.slug, d.contributor) + print("Owners") + print(d.permissions.owners) + print("------") + + import time + time.sleep(1000000) + self.assertEqual(len(usage_info), 2) self.assertEqual(usage_info[0]["username"], ADMIN_EMAIL) self.assertEqual(usage_info[1]["username"], USER_EMAIL)