diff options
| author | Thomi Richards <thomi.richards@canonical.com> | 2012-03-14 20:34:31 +1300 |
|---|---|---|
| committer | Thomi Richards <thomi.richards@canonical.com> | 2012-03-14 20:34:31 +1300 |
| commit | f7cc293b62bfa9792981c0abfb7de4f5d3c9d538 (patch) | |
| tree | b994d409cd326474f7f54d2ecbee2e43fc93cdb8 /tests | |
| parent | d7184387bf8893d2c37eed22693a74bd41121901 (diff) | |
Fixed new unity logging tests.
(bzr r2108.1.1)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/autopilot/autopilot/tests/test_unity_logging.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/autopilot/autopilot/tests/test_unity_logging.py b/tests/autopilot/autopilot/tests/test_unity_logging.py index 880aabc83..e5b2ec735 100644 --- a/tests/autopilot/autopilot/tests/test_unity_logging.py +++ b/tests/autopilot/autopilot/tests/test_unity_logging.py @@ -16,7 +16,7 @@ from time import sleep from autopilot.tests import AutopilotTestCase from autopilot.emulators.unity import ( start_log_to_file, - stop_logging_to_file, + reset_logging, set_log_severity, log_unity_message, ) @@ -35,7 +35,7 @@ class UnityLoggingTests(AutopilotTestCase): """ fpath = self.start_new_log_file() self.addCleanup(remove, fpath) - self.addCleanup(stop_logging_to_file) + self.addCleanup(reset_logging) sleep(1) self.assertTrue(exists(fpath)) @@ -43,7 +43,7 @@ class UnityLoggingTests(AutopilotTestCase): fpath = self.start_new_log_file() log_unity_message("WARNING", "This is a warning of things to come") sleep(1) - stop_logging_to_file() + reset_logging() with open(fpath, 'r') as f: self.assertThat(f.read(), Contains("This is a warning of things to come")) @@ -52,7 +52,7 @@ class UnityLoggingTests(AutopilotTestCase): fpath = self.start_new_log_file() log_unity_message("DEBUG", "This is some INFORMATION") sleep(1) - stop_logging_to_file() + reset_logging() with open(fpath, 'r') as f: self.assertThat(f.read(), Not(Contains("This is some INFORMATION"))) @@ -62,6 +62,6 @@ class UnityLoggingTests(AutopilotTestCase): self.addCleanup(set_log_severity, "", "INFO") log_unity_message("DEBUG", "This is some more INFORMATION") sleep(1) - stop_logging_to_file() + reset_logging() with open(fpath, 'r') as f: self.assertThat(f.read(), Contains("This is some more INFORMATION")) |
