Merge lp:~adam-collard/landscape-client/assert-python-26 into lp:~landscape/landscape-client/trunk

Proposed by Adam Collard
Status: Merged
Approved by: Adam Collard
Approved revision: 717
Merged at revision: 717
Proposed branch: lp:~adam-collard/landscape-client/assert-python-26
Merge into: lp:~landscape/landscape-client/trunk
Diff against target: 34 lines (+3/-3)
2 files modified
landscape/monitor/tests/test_plugin.py (+2/-2)
landscape/package/tests/test_changer.py (+1/-1)
To merge this branch: bzr merge lp:~adam-collard/landscape-client/assert-python-26
Reviewer Review Type Date Requested Status
Alberto Donato (community) Approve
Geoff Teale (community) Approve
Review via email: mp+181564@code.launchpad.net

Commit message

Replace use of assertIs* with assertTrue and use of is statement to maintain Python 2.6 compatibility.

Description of the change

Replace use of assertIs* with assertTrue and use of is statement to maintain Python 2.6 compatibility.

To post a comment you must log in.
Revision history for this message
Geoff Teale (tealeg) wrote :

+1 Looks awesome.

review: Approve
Revision history for this message
Alberto Donato (ack) wrote :

+1!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'landscape/monitor/tests/test_plugin.py'
2--- landscape/monitor/tests/test_plugin.py 2013-07-12 13:41:07 +0000
3+++ landscape/monitor/tests/test_plugin.py 2013-08-22 14:16:26 +0000
4@@ -76,7 +76,7 @@
5 plugin.persist.set("hi", "there")
6 self.assertEqual(self.monitor.persist.get("wubble"), {"hi": "there"})
7 self.reactor.fire("resynchronize")
8- self.assertIsNone(self.monitor.persist.get("wubble"))
9+ self.assertTrue(self.monitor.persist.get("wubble") is None)
10
11 def test_resynchronize_with_provided_scope(self):
12 """
13@@ -90,7 +90,7 @@
14 plugin.persist.set("hi", "there")
15 self.assertEqual(self.monitor.persist.get("wubble"), {"hi": "there"})
16 self.reactor.fire("resynchronize", scopes=["frujical"])
17- self.assertIsNone(self.monitor.persist.get("wubble"))
18+ self.assertTrue(self.monitor.persist.get("wubble") is None)
19
20 def test_do_not_resynchronize_with_other_scope(self):
21 """
22
23=== modified file 'landscape/package/tests/test_changer.py'
24--- landscape/package/tests/test_changer.py 2013-07-16 13:15:03 +0000
25+++ landscape/package/tests/test_changer.py 2013-08-22 14:16:26 +0000
26@@ -1494,7 +1494,7 @@
27 Invoking L{PackageChanger.run} results in the session ID being fetched.
28 """
29 def assert_session_id(ignored):
30- self.assertIsNotNone(self.changer._session_id)
31+ self.assertTrue(self.changer._session_id is not None)
32
33 self.changer._session_id = None
34 result = self.changer.run()

Subscribers

People subscribed via source and target branches

to all changes: