def test_07_create_subprofile(self): profiles = Profiles() profiles.setConfiguration("tests/files/test_valid.xml") dummy = { "name": "test_changed", "path": "/live/test", "type": "normal", "channels": [{ "name": "source1", "filter": "*", "sources": ["ch1"] }], "subprofiles": [] } profiles.createSubprofile("/live", dummy) prf_json = json.loads(profiles.getJSONString()) self.assertEqual( prf_json["live"]['subprofiles']["test_changed"]['name'], 'test_changed')