22 lines
697 B
Python
22 lines
697 B
Python
|
#curl -i -X POST http://localhost:8000/token -H "Content-Type: application/x-www-form-urlencoded" -d "username=johndoe&password=secret"
|
||
|
|
||
|
# curl -X 'GET' \
|
||
|
# 'http://localhost:8000/users/me/' \
|
||
|
# -H 'accept: application/json' \
|
||
|
# -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJqb2huZG9lIiwiZXhwIjoxNjMxNDQ4MjQ1fQ.DrM92jgRiry0uXBXn-61rRehATW4zDhHUWoGR6lv6Us'
|
||
|
from fastapi import FastAPI
|
||
|
from fastapi.testclient import TestClient
|
||
|
import docker
|
||
|
|
||
|
from server import *
|
||
|
|
||
|
app = FastAPI()
|
||
|
app.include_router(router)
|
||
|
testclient = TestClient(app)
|
||
|
|
||
|
def test_start():
|
||
|
#response = testclient.post("/server/minecraft/start")
|
||
|
#assert response.status_code == 200
|
||
|
pass
|
||
|
|