Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
    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'
Пример #4
0
    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'
Пример #5
0
    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"]