def test_create_library_and_add_keystore(self): lib = Library(self._path) lib.add_keystore("default", "ini", self._ini_uri) lib.save() _cp = SafeConfigParser() _cp.read(self._path) self.assertEqual(_cp.get("_DEFAULT", "uri"), self._ini_uri)
def test_add_keystore(self): with open(self._path, 'w') as fid: fid.writelines([ "[_DEFAULT]\n", ]) lib = Library(self._path) lib.add_keystore("my_store", "ini", self._ini_uri) lib.save() _cp = SafeConfigParser() _cp.read(self._path) self.assertEqual(_cp.get("MY_STORE", "uri"), self._ini_uri)