Helper to fetch subsection entries. It takes the entry name, allowing the usage of a dot to separate the different subsection names (eg. specifying 'a.b.c' as the key will return the value of self.data['a']['b']['c']).
(self, name)
| 42 | return json.loads(self.contents) |
| 43 | |
| 44 | def key(self, name): |
| 45 | """Helper to fetch subsection entries. |
| 46 | |
| 47 | It takes the entry name, allowing the usage of a dot to separate the |
| 48 | different subsection names (eg. specifying 'a.b.c' as the key will |
| 49 | return the value of self.data['a']['b']['c']). |
| 50 | """ |
| 51 | value = self.data |
| 52 | for part in name.split('.'): |
| 53 | value = value[part] |
| 54 | return value |
| 55 | |
| 56 | def test_top_level_container(self): |
| 57 | self.assertIsInstance(self.data, dict) |
no test coverage detected