mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-15 04:19:28 +08:00
change: make built_in comparators and functions as submodule
This commit is contained in:
@@ -5,7 +5,7 @@ from functools import wraps
|
||||
|
||||
from flask import Flask, make_response, request
|
||||
|
||||
from httprunner.built_in import gen_random_string
|
||||
from httprunner.builtin.functions import gen_random_string
|
||||
|
||||
try:
|
||||
from httpbin import app as httpbin_app
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import requests
|
||||
|
||||
from httprunner import built_in, exceptions, loader, response
|
||||
from httprunner import exceptions, response
|
||||
from httprunner.compat import basestring, bytes
|
||||
from tests.api_server import HTTPBIN_SERVER
|
||||
from tests.base import ApiServerUnittest
|
||||
@@ -8,9 +8,6 @@ from tests.base import ApiServerUnittest
|
||||
|
||||
class TestResponse(ApiServerUnittest):
|
||||
|
||||
def setUp(self):
|
||||
self.functions_mapping = loader.load.load_module_functions(built_in)
|
||||
|
||||
def test_parse_response_object_json(self):
|
||||
url = "http://127.0.0.1:5000/api/users"
|
||||
resp = requests.get(url)
|
||||
|
||||
@@ -62,8 +62,8 @@ class TestUtils(ApiServerUnittest):
|
||||
self.assertEqual(result, "L")
|
||||
|
||||
def current_validators(self):
|
||||
from httprunner import built_in
|
||||
functions_mapping = loader.load.load_module_functions(built_in)
|
||||
from httprunner.builtin import comparators
|
||||
functions_mapping = loader.load.load_module_functions(comparators)
|
||||
|
||||
functions_mapping["equals"](None, None)
|
||||
functions_mapping["equals"](1, 1)
|
||||
|
||||
Reference in New Issue
Block a user