refactor: make pytest testcases

This commit is contained in:
debugtalk
2022-06-26 13:21:25 +08:00
parent ccaa0d3361
commit 2caf5d5159
20 changed files with 92 additions and 110 deletions

View File

@@ -1,8 +1,6 @@
# NOTE: Generated By HttpRunner v4.1.4
# FROM: a-b.c/1.yml
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
from httprunner import HttpRunner, Config, Step, RunRequest
class TestCaseT1(HttpRunner):

View File

@@ -1,15 +1,13 @@
# NOTE: Generated By HttpRunner v4.1.4
# FROM: a-b.c/2 3.yml
from httprunner import HttpRunner, Config, Step, RunRequest
from httprunner import RunTestCase
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent.parent))
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
from a_b_c.T1_test import TestCaseT1 as T1

View File

@@ -1,8 +1,6 @@
# NOTE: Generated By HttpRunner v4.0.0
# NOTE: Generated By HttpRunner v4.1.4
# FROM: basic.yml
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
from httprunner import HttpRunner, Config, Step, RunRequest
class TestCaseBasic(HttpRunner):

View File

@@ -1,8 +1,6 @@
# NOTE: Generated By HttpRunner v4.0.0
# NOTE: Generated By HttpRunner v4.1.4
# FROM: hooks.yml
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
from httprunner import HttpRunner, Config, Step, RunRequest
class TestCaseHooks(HttpRunner):

View File

@@ -1,8 +1,6 @@
# NOTE: Generated By HttpRunner v4.0.0
# NOTE: Generated By HttpRunner v4.1.4
# FROM: load_image.yml
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
from httprunner import HttpRunner, Config, Step, RunRequest
class TestCaseLoadImage(HttpRunner):

View File

@@ -1,8 +1,6 @@
# NOTE: Generated By HttpRunner v4.0.0
# NOTE: Generated By HttpRunner v4.1.4
# FROM: upload.yml
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
from httprunner import HttpRunner, Config, Step, RunRequest
class TestCaseUpload(HttpRunner):

View File

@@ -1,8 +1,6 @@
# NOTE: Generated By HttpRunner v4.0.0
# NOTE: Generated By HttpRunner v4.1.4
# FROM: validate.yml
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
from httprunner import HttpRunner, Config, Step, RunRequest
class TestCaseValidate(HttpRunner):

View File

@@ -1,8 +1,6 @@
# NOTE: Generated By HttpRunner v4.0.0
# NOTE: Generated By HttpRunner v4.1.4
# FROM: cookie_manipulation/hardcode.yml
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
from httprunner import HttpRunner, Config, Step, RunRequest
class TestCaseHardcode(HttpRunner):

View File

@@ -1,8 +1,6 @@
# NOTE: Generated By HttpRunner v4.0.0
# NOTE: Generated By HttpRunner v4.1.4
# FROM: cookie_manipulation/set_delete_cookies.yml
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
from httprunner import HttpRunner, Config, Step, RunRequest
class TestCaseSetDeleteCookies(HttpRunner):

View File

@@ -1,8 +1,6 @@
# NOTE: Generated By HttpRunner v4.1.4
# FROM: request_methods/hardcode.yml
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
from httprunner import HttpRunner, Config, Step, RunRequest
class TestCaseHardcode(HttpRunner):

View File

@@ -1,8 +1,6 @@
# NOTE: Generated By HttpRunner v4.1.4
# FROM: request_methods/request_with_functions.yml
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
from httprunner import HttpRunner, Config, Step, RunRequest
class TestCaseRequestWithFunctions(HttpRunner):

View File

@@ -1,16 +1,11 @@
# NOTE: Generated By HttpRunner v4.1.4
# FROM: request_methods/request_with_parameters.yml
import pytest
from httprunner import HttpRunner, Config, Step, RunRequest
from httprunner import Parameters
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
class TestCaseRequestWithParameters(HttpRunner):
@pytest.mark.parametrize(
"param",

View File

@@ -1,15 +1,13 @@
# NOTE: Generated By HttpRunner v4.1.4
# FROM: request_methods/request_with_testcase_reference.yml
from httprunner import HttpRunner, Config, Step, RunRequest
from httprunner import RunTestCase
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent.parent))
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
from request_methods.request_with_functions_test import (
TestCaseRequestWithFunctions as RequestWithFunctions,
)

View File

@@ -1,8 +1,6 @@
# NOTE: Generated By HttpRunner v4.1.4
# FROM: request_methods/request_with_variables.yml
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
from httprunner import HttpRunner, Config, Step, RunRequest
class TestCaseRequestWithVariables(HttpRunner):

View File

@@ -1,8 +1,6 @@
# NOTE: Generated By HttpRunner v4.1.4
# FROM: request_methods/validate_with_functions.yml
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
from httprunner import HttpRunner, Config, Step, RunRequest
class TestCaseValidateWithFunctions(HttpRunner):

View File

@@ -1,8 +1,6 @@
# NOTE: Generated By HttpRunner v4.1.4
# FROM: request_methods/validate_with_variables.yml
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
from httprunner import HttpRunner, Config, Step, RunRequest
class TestCaseValidateWithVariables(HttpRunner):