mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fix KB list bugs and add web api test (#3649)
### What problem does this PR solve? 1. Read KB list path parameter, page_number and page_size, which type isn't int 2. Add cases on create / list / delete datasets. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) - [x] Test cases Signed-off-by: jinhai <haijin.chn@gmail.com>
This commit is contained in:
@ -7,10 +7,13 @@ import requests
|
||||
|
||||
HOST_ADDRESS = os.getenv('HOST_ADDRESS', 'http://127.0.0.1:9380')
|
||||
|
||||
def generate_random_email():
|
||||
return 'user_' + ''.join(random.choices(string.ascii_lowercase + string.digits, k=8))+'@1.com'
|
||||
# def generate_random_email():
|
||||
# return 'user_' + ''.join(random.choices(string.ascii_lowercase + string.digits, k=8))+'@1.com'
|
||||
|
||||
EMAIL = generate_random_email()
|
||||
def generate_email():
|
||||
return 'user_123@1.com'
|
||||
|
||||
EMAIL = generate_email()
|
||||
# password is "123"
|
||||
PASSWORD='''ctAseGvejiaSWWZ88T/m4FQVOpQyUvP+x7sXtdv3feqZACiQleuewkUi35E16wSd5C5QcnkkcV9cYc8TKPTRZlxappDuirxghxoOvFcJxFU4ixLsD
|
||||
fN33jCHRoDUW81IH9zjij/vaw8IbVyb6vuwg6MX6inOEBRRzVbRYxXOu1wkWY6SsI8X70oF9aeLFp/PzQpjoe/YbSqpTq8qqrmHzn9vO+yvyYyvmDsphXe
|
||||
@ -49,7 +52,10 @@ def get_api_key_fixture():
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def get_auth():
|
||||
register()
|
||||
try:
|
||||
register()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
auth = login()
|
||||
return auth
|
||||
|
||||
|
||||
Reference in New Issue
Block a user