get child categories test fix
get child categories test fix
Fix configuration test_default
@@ -61,25 +61,68 @@ class TestConfiguration:
assert 3 == len(jdoc["categories"])
expected_with_utilities = [
- {'children': [{'children': [], 'displayName': 'Scheduler', 'key': 'SCHEDULER',
- 'description': 'Scheduler configuration'},
- {'children': [], 'displayName': 'Service Monitor', 'key': 'SMNTR',
- 'description': 'Service Monitor'},
- {'children': [{'children': [], 'displayName': 'sqlite', 'key': 'sqlite',
- 'description': 'Storage Plugin'}], 'displayName': 'Storage', 'key': 'Storage',
- 'description': 'Storage configuration'}],
- 'displayName': 'Advanced', 'key': 'Advanced', 'description': 'Advanced'
+ {
+ 'key': 'Advanced',
+ 'description': 'Advanced',
+ 'displayName': 'Advanced',
+ 'children': [
+ {
+ 'key': 'Storage',
+ 'description': 'Storage configuration',
+ 'displayName': 'Storage',
+ 'children': [
+ {
+ 'key': 'sqlite',
+ 'description': 'Storage Plugin',
+ 'displayName': 'sqlite',
+ 'children': []
+ }
+ ]
+ },
+ {
+ 'key': 'SMNTR',
+ 'description': 'Service Monitor',
+ 'displayName': 'Service Monitor',
+ 'children': []
+ },
+ {
+ 'key': 'SCHEDULER',
+ 'description': 'Scheduler configuration',
+ 'displayName': 'Scheduler',
+ 'children': []
+ }
+ ]
+ },
+ {
+ 'key': 'General',
+ 'description': 'General',
+ 'displayName': 'General',
+ 'children': [
+ {
+ 'key': 'service',
+ 'description': 'Fledge Service',
+ 'displayName': 'Fledge Service',
+ 'children': []
+ },
+ {
+ 'key': 'rest_api',
+ 'description': 'Fledge Admin and User REST API',
+ 'displayName': 'Admin API',
+ 'children': []
},
- {'children': [{'children': [], 'key': 'Installation', 'description': 'Installation', 'displayName': 'Installation'},
- {'children': [], 'displayName': 'Admin API', 'key': 'rest_api',
- 'description': 'Fledge Admin and User REST API'},
- {'children': [], 'displayName': 'Fledge Service', 'key': 'service',
- 'description': 'Fledge Service'}
- ],
- 'displayName': 'General', 'key': 'General', 'description': 'General'
+ {
+ 'key': 'Installation',
+ 'description': 'Installation',
+ 'displayName': 'Installation',
+ 'children': []
+ }
+ ]
},
- {'children': [],
- 'displayName': 'Utilities', 'key': 'Utilities', 'description': 'Utilities'
+ {
+ 'key': 'Utilities',
+ 'description': 'Utilities',
+ 'displayName': 'Utilities',
+ 'children': []
}
]
@@ -203,9 +246,9 @@ class TestConfiguration:
assert Counter(expected) == Counter(jdoc)
def test_get_child_category(self, fledge_url):
- expected = [{'displayName': 'Installation', 'key': 'Installation', 'description': 'Installation'},
+ expected = [{'displayName': 'Fledge Service', 'key': 'service', 'description': 'Fledge Service'},
{'displayName': 'Admin API', 'key': 'rest_api', 'description': 'Fledge Admin and User REST API'},
- {'displayName': 'Fledge Service', 'key': 'service', 'description': 'Fledge Service'}]
+ {'displayName': 'Installation', 'key': 'Installation', 'description': 'Installation'}]
conn = http.client.HTTPConnection(fledge_url)
conn.request("GET", '/fledge/category/General/children')
r = conn.getresponse()
