From 07e42ec8527b3db951e9ca92a4cdfa9ec63a4f4c Mon Sep 17 00:00:00 2001 From: Matthew Richards Date: Fri, 20 Nov 2020 12:42:24 +0000 Subject: [PATCH] #150: Add skeleton classes for remaining ICAT backend tests --- test/icat/test_isis_endpoints.py | 12 +++++ test/icat/test_session_handling.py | 24 ++++++++++ test/icat/test_standard_endpoints.py | 70 ++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 test/icat/test_isis_endpoints.py create mode 100644 test/icat/test_session_handling.py create mode 100644 test/icat/test_standard_endpoints.py diff --git a/test/icat/test_isis_endpoints.py b/test/icat/test_isis_endpoints.py new file mode 100644 index 00000000..c0dffec4 --- /dev/null +++ b/test/icat/test_isis_endpoints.py @@ -0,0 +1,12 @@ +class TestISISEndpoints: + def test_valid_get_facility_cycles_with_filters(self): + pass + + def test_valid_get_facility_cycles_count_with_filters(self): + pass + + def test_valid_get_investigations_with_filters(self): + pass + + def test_valid_get_investigations_count_with_filters(seLf): + pass diff --git a/test/icat/test_session_handling.py b/test/icat/test_session_handling.py new file mode 100644 index 00000000..53ae6d83 --- /dev/null +++ b/test/icat/test_session_handling.py @@ -0,0 +1,24 @@ +class TestSessionHandling: + def test_session_id_decorator(self): + pass + + def test_get_valid_session_details(self): + pass + + def test_get_invalid_session_details(self): + pass + + def test_refresh_session(self): + pass + + def test_valid_login(self): + pass + + def test_invalid_login(self): + pass + + def test_valid_logout(self): + pass + + def test_invalid_logout(self): + pass diff --git a/test/icat/test_standard_endpoints.py b/test/icat/test_standard_endpoints.py new file mode 100644 index 00000000..5240072d --- /dev/null +++ b/test/icat/test_standard_endpoints.py @@ -0,0 +1,70 @@ +class TestStandardEndpoints: + def test_all_endpoints_exist(self): + pass + + def test_valid_get_with_filters(self): + pass + + def test_invalid_get_with_filters(self): + # Invalid data? + pass + + def test_filters_applied_get_with_filters(self): + pass + + def test_valid_create_data(self): + pass + + def test_invalid_create_data(self): + # Invalid request body + pass + + def test_invalid_create_data_1(self): + # TODO - Rename function + # Target ICATObjectExistsError + pass + + def test_valid_update_data(self): + pass + + def test_valid_boundary_update_data(self): + """ Request body is a dictionary, not a list of dictionaries""" + pass + + def test_invalid_update_data(self): + # Exclude an ID at in one of the data pieces + pass + + def test_valid_get_one_with_filters(self): + pass + + def test_filters_applied_get_one_with_filters(self): + # Can't be a limit filter, maybe order desc would be better + pass + + def test_valid_count_with_filters(self): + pass + + def test_filters_applied_count_with_filters(self): + pass + + def test_valid_get_with_id(self): + pass + + def test_invalid_get_with_id(self): + # Do a get one with filters (order desc), extract the id of that, add 5 and do a + # request for that + pass + + def test_valid_delete_with_id(self): + pass + + def test_invalid_delete_with_id(self): + # like invalid get, but try to delete + pass + + def test_valid_update_with_id(self): + pass + + def test_invalid_update_with_id(self): + pass