diff --git a/toardb/stationmeta/test_stationmeta.py b/toardb/stationmeta/test_stationmeta.py index 6ee24caa9b9bceaa3f4f69026844c5f9335cb628..6d44513d3dc2e06e82aea954aaa967f77e819198 100644 --- a/toardb/stationmeta/test_stationmeta.py +++ b/toardb/stationmeta/test_stationmeta.py @@ -101,19 +101,19 @@ class TestApps: ## 'coordinates': {'lat': 36.256, 'lng': 117.106, 'alt': 1534.0}, ## 'country': 'China', 'state': 'Shandong Sheng', ## 'coordinate_validation_status': 0, 'coordinate_validation_date': '2020-02-28T12:27:03.746260+01:00', -## 'type_of_environment': 0, 'type_of_area': 0, 'category': '', 'timezone': '', +## 'type_of_environment': 0, 'type_of_area': 0, 'timezone': '', ## 'additional_metadata': {}, 'coordinate_validator_id': 1}, ## {'id': 2, 'codes': ['SDZ54421'], 'name': 'Shangdianzi', ## 'coordinates': {'lat': 40.65, 'lng': 117.106, 'alt': 293.9}, ## 'country': 'China', 'state': 'Beijing Shi', ## 'coordinate_validation_status': 0, 'coordinate_validation_date': '2020-02-28T12:27:03.746260+01:00', -## 'type_of_environment': 0, 'type_of_area': 0, 'category': '', 'timezone': '', +## 'type_of_environment': 0, 'type_of_area': 0, 'timezone': '', ## 'additional_metadata': {}, 'coordinate_validator_id': 1}, ## {'id': 3, 'codes': ['China_test8'], 'name': 'Test_China', ## 'coordinates': {'lat': 36.256, 'lng': 117.106, 'alt': 1534.0}, ## 'country': 'China', 'state': 'Shandong Sheng', ## 'coordinate_validation_status': 0, 'coordinate_validation_date': '2020-03-11T12:22:18.047974+01:00', -## 'type_of_environment': 0, 'type_of_area': 0, 'category': '', 'timezone': '', +## 'type_of_environment': 0, 'type_of_area': 0, 'timezone': '', ## 'additional_metadata': {}, 'coordinate_validator_id': 1}] ## assert response.json() == expected_resp @@ -140,7 +140,7 @@ class TestApps: 'coordinates': {'lat': 36.256, 'lng': 117.106, 'alt': 1534.0}, 'country': 'China', 'state': 'Shandong Sheng', 'coordinate_validation_status': 'NotChecked', 'coordinate_validation_date': '2020-03-11T12:22:18.047974+01:00', 'type_of_environment': 'Unknown', - 'type_of_area': 'Unknown', 'category': '', 'timezone': '', + 'type_of_area': 'Unknown', 'timezone': '', 'additional_metadata': {}, 'coordinate_validator_id': 1} assert response.json() == expected_resp @@ -153,7 +153,7 @@ class TestApps: 'coordinates': {'lat': 36.256, 'lng': 117.106, 'alt': 1534.0}, 'country': 'China', 'state': 'Shandong Sheng', 'coordinate_validation_status': 'NotChecked', 'coordinate_validation_date': '2020-03-11T12:22:18.047974+01:00', 'type_of_environment': 'Unknown', - 'type_of_area': 'Unknown', 'category': '', 'timezone': '', + 'type_of_area': 'Unknown', 'timezone': '', 'additional_metadata': {}, 'coordinate_validator_id': 1, 'roles': [], 'annotations': [], 'aux_images': [], 'aux_docs': [], 'aux_urls': [], 'globalmeta': None, 'globalservice': None} @@ -178,23 +178,13 @@ class TestApps: def test_insert_new(self, client, db): -# response = client.post("/stationmeta/", -# json={"stationmeta": -# {"codes":["ttt3","ttt4"], -# "name":"Test_China","coordinates":{"lat":36.256,"lng":117.106,"alt":1534.0}, -# "country":"China","state":"Shandong Sheng","coordinate_validation_status":"NotChecked", -# "coordinate_validation_date":"2020-03-11T12:22:18.047974+01:00", -# "type_of_environment":"Unknown","type_of_area":"Unknown","category":"","timezone":"", -# "coordinate_validator_id": 1, "additional_metadata":"{}"} -# } -# ) response = client.post("/stationmeta/", json={"stationmeta": {"codes":["ttt3","ttt4"], "name":"Test_China","coordinates":{"lat":36.256,"lng":117.106,"alt":1534.0}, "country":"China","state":"Shandong Sheng","coordinate_validation_status":"NotChecked", "coordinate_validation_date":"2020-03-11T12:22:18.047974+01:00", - "type_of_environment":"Unknown","type_of_area":"Unknown","category":"","timezone":"", + "type_of_environment":"Unknown","type_of_area":"Unknown","timezone":"", "coordinate_validator_id": 1, "additional_metadata":"{}"} } ) @@ -204,7 +194,7 @@ class TestApps: 'coordinates': {'lat': 36.256, 'lng': 117.106, 'alt': 1534.0}, 'country': 'China', 'state': 'Shandong Sheng', 'coordinate_validation_status': 'NotChecked', 'coordinate_validation_date': '2020-03-11T12:22:18.047974+01:00', 'type_of_environment': 'Unknown', - 'type_of_area': 'Unknown', 'category': '', 'timezone': '', + 'type_of_area': 'Unknown', 'timezone': '', 'additional_metadata': {}, 'coordinate_validator_id': 1, 'roles': [], 'annotations': [], 'aux_images': [], 'aux_docs': [], 'aux_urls': [], 'globalmeta': None, 'globalservice': None} @@ -218,7 +208,7 @@ class TestApps: "name":"Test_China","coordinates":{"lat":36.256,"lng":117.106,"alt":1534.0}, "country":"China","state":"Shandong Sheng","coordinate_validation_status":"NotChecked", "coordinate_validation_date":"2020-03-11T12:22:18.047974+01:00", - "type_of_environment":"Unknown","type_of_area":"Unknown","category":"","timezone":"", + "type_of_environment":"Unknown","type_of_area":"Unknown","timezone":"", "coordinate_validator_id": 1, "additional_metadata":"{}"} } )