~jonas-drange/ubuntu-system-settings/fix-sound-ap-regression

« back to all changes in this revision

Viewing changes to tests/autopilot/ubuntu_system_settings/tests/test_hotspot.py

  • Committer: CI Train Bot
  • Author(s): jonas-drange
  • Date: 2015-09-10 19:01:37 UTC
  • mfrom: (1513.2.14 allow-insecure-hotspot)
  • Revision ID: ci-train-bot@canonical.com-20150910190137-jg2i95zif9nxv9xq
[hotspot] allow insecure hotspot, hide hotspot for mako, make autopilot tests run on mako, and change packaging so we get a newer Connectivity API (provided by indicator-network). Fixes: #1431876
Approved by: Ken VanDine

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
            Eventually(Equals(True))
57
57
        )
58
58
 
 
59
    def test_insecure_setup(self):
 
60
        ssid = 'bar'
 
61
        auth = 'none'
 
62
        config = {'ssid': ssid, 'auth': auth}
 
63
 
 
64
        self.hotspot_page.setup_hotspot(config)
 
65
 
 
66
        # Assert that the switch is on.
 
67
        self.assertTrue(self.hotspot_page.get_hotspot_status())
 
68
 
 
69
        self.assertThat(
 
70
            lambda: self.ctv_private.Get(CTV_PRIV_IFACE, 'HotspotAuth'),
 
71
            Eventually(Equals(auth))
 
72
        )
 
73
 
 
74
        self.assertThat(
 
75
            lambda: self.ctv_nets.Get(CTV_NETS_IFACE, 'HotspotStored'),
 
76
            Eventually(Equals(True))
 
77
        )
 
78
 
59
79
 
60
80
class HotspotExistsTestCase(HotspotBaseTestCase):
61
81
 
80
100
 
81
101
    def test_changing(self):
82
102
        ssid = 'bar'
83
 
        password = 'zomgzomg'
84
 
        config = {'ssid': ssid, 'password': password}
 
103
        config = {'ssid': ssid}
85
104
        self.hotspot_page.setup_hotspot(config)
86
105
 
87
106
        self.assertThat(
91
110
            Eventually(Equals(ssid))
92
111
        )
93
112
 
94
 
        self.assertThat(
95
 
            lambda: self.ctv_private.Get(CTV_PRIV_IFACE, 'HotspotPassword'),
96
 
            Eventually(Equals(password))
97
 
        )
98
 
 
99
113
 
100
114
class HotspotRunningTestCase(HotspotBaseTestCase):
101
115
 
166
180
 
167
181
    def test_setup(self):
168
182
        ssid = 'bar'
169
 
        password = 'zomgzomg'
170
 
        config = {'ssid': ssid, 'password': password}
 
183
        config = {'ssid': ssid}
171
184
 
172
185
        self.assertThat(
173
186
            lambda: self.ctv_nets.Get(CTV_NETS_IFACE, 'HotspotStored'),