def get_username_password(): if not (Config.get(ConfigKey.USERNAME) and Config.get(ConfigKey.PASSWORD)): username, password = prompt_username_password() Config.set(ConfigKey.USERNAME, username) Config.set(ConfigKey.PASSWORD, password) return (Config.get(ConfigKey.USERNAME), Config.get(ConfigKey.PASSWORD))
def get_command(): if not (Config.get(ConfigKey.COMMAND)): command = input('Command: ') Config.set(ConfigKey.COMMAND, command) return Config.get(ConfigKey.COMMAND)
def test_values_can_be_set(self): Config.set(ConfigKey.USERNAME, 'testValue') self.assertEqual(Config.get(ConfigKey.USERNAME), 'testValue')