diff --git a/uhepp_org/uhepp_api/tests/test_plots.py b/uhepp_org/uhepp_api/tests/test_plots.py index 2f9febde4f2ee6264e1d7621e5ca62396fe66f86..ad8aa774194656e155e972fee6c829c9051dfeac 100644 --- a/uhepp_org/uhepp_api/tests/test_plots.py +++ b/uhepp_org/uhepp_api/tests/test_plots.py @@ -7,6 +7,20 @@ from uhepp_vault.models import Collection, Plot from uhepp_vault.models import PUBLIC_LEVEL, INTERNAL_LEVEL, PRIVATE_LEVEL +TOY_DATA = { + "version": "0.1", + "type": "histogram", + "stacks": [], + "yields": {}, + "variable": {"symbol": "m"}, + "bins": {"edges": [0, 10]}, + "metadata": { + "filename": "", + "date": "", + } +} + + class CollectionsEndpointTestCase(TestCase): """Test the /collections endpoint of the api""" @@ -483,7 +497,7 @@ class CollectionsEndpointTestCase(TestCase): response = self.client.post( reverse("plot-list"), - dict(uhepp={}, collection=collection_url), + dict(uhepp=TOY_DATA, collection=collection_url), format="json" ) status_code = response.status_code @@ -542,7 +556,7 @@ class CollectionsEndpointTestCase(TestCase): self.client.force_authenticate(self.frank) response = self.client.post( reverse("plot-list"), - dict(uhepp={}, collection=collection_url), + dict(uhepp=TOY_DATA, collection=collection_url), format="json" )