From eb2018c9584cfa70f60cce2d13b8f4f410d91d34 Mon Sep 17 00:00:00 2001 From: Lars Holmberg Date: Tue, 6 Sep 2022 23:38:33 +0200 Subject: [PATCH] test_main.py/test_distributed_tags: fix error in test --- locust/test/test_main.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/locust/test/test_main.py b/locust/test/test_main.py index 7742f76656..cab3b2c416 100644 --- a/locust/test/test_main.py +++ b/locust/test/test_main.py @@ -1170,10 +1170,8 @@ def on_test_stop(environment, **kwargs): self.assertEqual(0, proc_worker.returncode) def test_distributed_tags(self): - content = ( - MOCK_LOCUSTFILE_CONTENT - + """ -from locust import tag + content = """ +from locust import HttpUser, TaskSet, task, between, LoadTestShape, tag class SecondUser(HttpUser): host = "http://127.0.0.1:8089" wait_time = between(0, 0.1) @@ -1187,7 +1185,6 @@ def task1(self): def task2(self): print("task2") """ - ) with mock_locustfile(content=content) as mocked: proc = subprocess.Popen( [