def all(cls): """ Returns an generator of saved schemes. """ ensure_file_exists(cls.interfaces) with open(cls.interfaces, 'r') as f: return extract_schemes(f.read(), scheme_class=cls)
def test_scheme_extraction(self): work, coffee, home, coffee2 = list(extract_schemes(NETWORK_INTERFACES_FILE))[:4] assert work.name == 'work' assert work.options['wpa-ssid'] == 'workwifi' assert coffee.name == 'coffee' assert coffee.options['wireless-essid'] == 'Coffee WiFi'
def test_scheme_extraction(self): work, coffee, home, coffee2 = extract_schemes(NETWORK_INTERFACES_FILE) assert work.name == 'work' assert work.options['wpa-ssid'] == 'workwifi' assert coffee.name == 'coffee' assert coffee.options['wireless-essid'] == 'Coffee WiFi'
def test_scheme_extraction(self): work, coffee, home, coffee2 = extract_schemes(NETWORK_INTERFACES_FILE) assert work.name == "work" assert work.options["wpa-ssid"] == ["workwifi"] assert coffee.name == "coffee" assert coffee.options["wireless-essid"] == ["Coffee WiFi"]