Merge lp:~nataliabidart/ubuntuone-client/avoid-locale-mixup-in-log-test into lp:ubuntuone-client

Proposed by Natalia Bidart
Status: Merged
Approved by: Tim Cole
Approved revision: 431
Merged at revision: not available
Proposed branch: lp:~nataliabidart/ubuntuone-client/avoid-locale-mixup-in-log-test
Merge into: lp:ubuntuone-client
Diff against target: 17 lines (+2/-2)
1 file modified
tests/syncdaemon/test_fsm.py (+2/-2)
To merge this branch: bzr merge lp:~nataliabidart/ubuntuone-client/avoid-locale-mixup-in-log-test
Reviewer Review Type Date Requested Status
Tim Cole (community) Approve
Facundo Batista (community) Approve
Review via email: mp+21477@code.launchpad.net

Commit message

Avoiding locale issues when asserting over OSError description.

Description of the change

Avoiding locale issues when asserting over OSError description.

To post a comment you must log in.
Revision history for this message
Facundo Batista (facundo) wrote :

This fixed it!

review: Approve
Revision history for this message
Tim Cole (tcole) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/syncdaemon/test_fsm.py'
2--- tests/syncdaemon/test_fsm.py 2010-03-15 23:12:30 +0000
3+++ tests/syncdaemon/test_fsm.py 2010-03-16 19:32:31 +0000
4@@ -1940,11 +1940,11 @@
5 # local_dir does not exist on the file system
6 self.fsm.delete_file(local_dir)
7
8- log_msg = 'OSError [Errno 2] No such file or directory'
9 warnings = [record.message for record in self.memento.records
10 if record.levelname == 'WARNING']
11 self.assertTrue(len(warnings) == 1)
12- self.assertTrue(log_msg in warnings[0])
13+ self.assertTrue('OSError [Errno 2]' in warnings[0])
14+ self.assertTrue(local_dir in warnings[0])
15
16 def test_move_dir_to_conflict(self):
17 """Test that the conflict to a dir removes children metadata."""

Subscribers

People subscribed via source and target branches