Merge lp:~mikemc/ubuntu-sso-client/fix-1003692 into lp:ubuntu-sso-client
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Mike McCracken | ||||
Approved revision: | 962 | ||||
Merged at revision: | 962 | ||||
Proposed branch: | lp:~mikemc/ubuntu-sso-client/fix-1003692 | ||||
Merge into: | lp:ubuntu-sso-client | ||||
Diff against target: |
169 lines (+48/-93) 2 files modified
ubuntu_sso/networkstate/linux.py (+4/-1) ubuntu_sso/networkstate/tests/test_linux.py (+44/-92) |
||||
To merge this branch: | bzr merge lp:~mikemc/ubuntu-sso-client/fix-1003692 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Manuel de la Peña (community) | Approve | ||
Alejandro J. Cura (community) | Approve | ||
Review via email: mp+107159@code.launchpad.net |
Commit message
- Fixes "TypeError in got_state()" message and incorrect network detection on linux ( LP #1003692 )
Description of the change
- Fixes "TypeError in got_state()" message and incorrect network detection on linux ( LP #1003692 )
The linux version of is_machine_
The branch also adds tests for calling the callback with those three state values, and removes tests for calling the callback with int constants from NetworkManager that it will not be called with - they're only used inside NetworkManagerS
Finally, it adds coverage in the tests of the NetworkManagerState class for three states from networkmanager that were not tested before - asleep, asleep_old, and unknown.
Note that the new tests say that the code should handle the "NetworkManager gave us state NM_UNKNOWN" case by returning "OFFLINE", not "UNKNOWN". This is to match the behavior of the code and its only client: syncdaemon's interaction_
Tests pass on linux.
Code looks good, all tests pass on Linux. +1