Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove repeated imports of mock #936

Merged
merged 1 commit into from
Dec 19, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions locust/test/test_runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ def tearDown(self):
events.slave_report._handlers = self._slave_report_event_handlers

def test_slave_connect(self):
import mock

class MyTestLocust(Locust):
pass

Expand All @@ -74,8 +72,6 @@ class MyTestLocust(Locust):
self.assertEqual(3, len(master.clients))

def test_slave_stats_report_median(self):
import mock

class MyTestLocust(Locust):
pass

Expand All @@ -96,8 +92,6 @@ class MyTestLocust(Locust):
self.assertEqual(700, s.median_response_time)

def test_master_total_stats(self):
import mock

class MyTestLocust(Locust):
pass

Expand All @@ -124,8 +118,6 @@ class MyTestLocust(Locust):
self.assertEqual(700, master.stats.total.median_response_time)

def test_master_current_response_times(self):
import mock

class MyTestLocust(Locust):
pass

Expand Down Expand Up @@ -203,8 +195,6 @@ def test_spawn_uneven_locusts(self):
Tests that we can accurately spawn a certain number of locusts, even if it's not an
even number of the connected slaves
"""
import mock

class MyTestLocust(Locust):
pass

Expand All @@ -223,8 +213,6 @@ class MyTestLocust(Locust):
self.assertEqual(7, num_clients, "Total number of locusts that would have been spawned is not 7")

def test_spawn_fewer_locusts_than_slaves(self):
import mock

class MyTestLocust(Locust):
pass

Expand Down