Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

test_reference.py 616 B

12345678910111213141516171819202122
  1. import unittest
  2. from ..reference import Reference
  3. class TestReference(unittest.TestCase):
  4. def check_json_values(self, json_object):
  5. for value in json_object.values():
  6. if isinstance(value, (dict, list)):
  7. self.check_json_values(value)
  8. else:
  9. self.assertIsInstance(value, (str, int, float))
  10. def test_json_serialisation(self):
  11. reference = Reference("git", "/tmp/t1", "SomeClass", "some-location")
  12. json_object = reference.to_json_obj()
  13. self.check_json_values(json_object)
  14. if __name__ == '__main__':
  15. unittest.main()