conman: Make FrenzyWPACtrl.attached a property.
WPACtrl.attached is a property, and the fake one in FrenzyWPACtrl should
be too. This allowed some tests to pass incorrectly (due only to
shortcomings in test code).
Change-Id: I6bb3d1b765f61c96edb7816999ca14cd259e387f
diff --git a/conman/interface.py b/conman/interface.py
index 234ff08..72818d2 100755
--- a/conman/interface.py
+++ b/conman/interface.py
@@ -453,6 +453,7 @@
def attach(self):
self._update()
+ @property
def attached(self):
return self._client_mode
diff --git a/conman/interface_test.py b/conman/interface_test.py
index 20579e3..f6dafbd 100755
--- a/conman/interface_test.py
+++ b/conman/interface_test.py
@@ -161,13 +161,17 @@
return self.fake_qcsapi.get(command[0], None)
def add_connected_event(self):
+ self.fake_qcsapi['get_mode'] = 'Station'
json.dump({'SSID': 'my ssid'}, open(self._wifiinfo_filename(), 'w'))
+ self._update()
def add_disconnected_event(self):
json.dump({'SSID': ''}, open(self._wifiinfo_filename(), 'w'))
+ self._update()
def add_terminating_event(self):
self.fake_qcsapi['get_mode'] = 'AP'
+ self._update()
class FrenzyWifi(FakeInterfaceMixin, interface.FrenzyWifi):