Skip to content

Commit

Permalink
WIP: test info
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorjerse committed Oct 7, 2024
1 parent a164ed7 commit 41ab9ca
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/functional/resolwe/e2e_resolwe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 41ab9ca

Please sign in to comment.