|
21 | 21 | from AndroidRunner.util import ConfigError, makedirs |
22 | 22 | from tests.PluginTests import PluginTests |
23 | 23 | from AndroidRunner.PrematureStoppableRun import PrematureStoppableRun |
24 | | - |
| 24 | +from tests.unit.fixtures.FakeDevice import FakeDevice |
25 | 25 |
|
26 | 26 | # noinspection PyUnusedLocal |
27 | 27 | class TestExperiment(object): |
@@ -498,7 +498,7 @@ def test_after_launch(self, script_run, default_experiment): |
498 | 498 | kwargs = {'arg1': 1, 'arg2': 2} |
499 | 499 | mock_device = Mock() |
500 | 500 | mock_device.id = 123 |
501 | | - current_activity = 'Working on theses' |
| 501 | + current_activity = FakeDevice.current_activity() |
502 | 502 | mock_device.current_activity.return_value = current_activity |
503 | 503 | path = 'test/path' |
504 | 504 | run = 1234566789 |
@@ -549,7 +549,7 @@ def test_before_close(self, script_run, default_experiment): |
549 | 549 | kwargs = {'arg1': 1, 'arg2': 2} |
550 | 550 | mock_device = Mock() |
551 | 551 | mock_device.id = 123 |
552 | | - current_activity = 'Working on theses' |
| 552 | + current_activity = FakeDevice.current_activity() |
553 | 553 | mock_device.current_activity.return_value = current_activity |
554 | 554 | path = 'test/path' |
555 | 555 | run = 1234566789 |
@@ -1090,7 +1090,7 @@ def test_before_run(self, before_run, sleep, web_experiment): |
1090 | 1090 | kwargs = {'arg1': 1, 'arg2': 2, 'browser': mock_browser} |
1091 | 1091 | mock_device = Mock() |
1092 | 1092 | mock_device.id = 'id' |
1093 | | - current_activity = "playing euro truck simulator 2" |
| 1093 | + current_activity = FakeDevice.current_activity() |
1094 | 1094 | mock_device.current_activity.return_value = current_activity |
1095 | 1095 | path = 'test/path' |
1096 | 1096 | run = 123456789 |
@@ -1136,7 +1136,7 @@ def test_after_run(self, after_run, sleep, web_experiment): |
1136 | 1136 | kwargs = {'arg1': 1, 'arg2': 2, 'browser': mock_browser} |
1137 | 1137 | mock_device = Mock() |
1138 | 1138 | mock_device.id = 'id' |
1139 | | - current_activity = "playing euro truck simulator 2" |
| 1139 | + current_activity = FakeDevice.current_activity() |
1140 | 1140 | mock_device.current_activity.return_value = current_activity |
1141 | 1141 | path = 'test/path' |
1142 | 1142 | run = 123456789 |
@@ -1335,7 +1335,7 @@ def test_before_run(self, before_run, after_launch, native_experiment): |
1335 | 1335 | kwargs = {'arg1': 1, 'arg2': 2} |
1336 | 1336 | mock_device = Mock() |
1337 | 1337 | mock_device.id = 'id' |
1338 | | - current_activity = "playing euro truck simulator 2" |
| 1338 | + current_activity = FakeDevice.current_activity() |
1339 | 1339 | mock_device.current_activity.return_value = current_activity |
1340 | 1340 | path = 'test/path' |
1341 | 1341 | run = 123456789 |
@@ -1377,7 +1377,7 @@ def test_after_run(self, after_run, native_experiment): |
1377 | 1377 | kwargs = {'arg1': 1, 'arg2': 2} |
1378 | 1378 | mock_device = Mock() |
1379 | 1379 | mock_device.id = 'id' |
1380 | | - current_activity = "playing euro truck simulator 2" |
| 1380 | + current_activity = FakeDevice.current_activity() |
1381 | 1381 | mock_device.current_activity.return_value = current_activity |
1382 | 1382 | path = 'test/path' |
1383 | 1383 | run = 123456789 |
|
0 commit comments