mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-21 16:23:16 +08:00
fix locust in testsuite
This commit is contained in:
@@ -598,3 +598,12 @@ class TestLocust(unittest.TestCase):
|
||||
self.assertEqual(len(locust_tests["tests"]), 10)
|
||||
self.assertEqual(locust_tests["tests"][0]["name"], "index")
|
||||
self.assertEqual(locust_tests["tests"][9]["name"], "user-agent")
|
||||
|
||||
def test_prepare_locust_tests_with_layer(self):
|
||||
path = os.path.join(
|
||||
os.getcwd(), 'tests/locust_tests/demo_locust_with_layer.yml')
|
||||
locust_tests = prepare_locust_tests(path)
|
||||
self.assertIn("gen_md5", locust_tests["functions"])
|
||||
self.assertEqual(len(locust_tests["tests"]), 4 * 2 + 4 * 3)
|
||||
self.assertIn("setup and reset all (override)", locust_tests["tests"][0]["config"]["name"])
|
||||
self.assertIn("check if user ", locust_tests["tests"][19]["name"])
|
||||
|
||||
Reference in New Issue
Block a user