mirror of
https://github.com/GNS3/gns3-server
synced 2025-01-16 11:00:58 +00:00
Move old test to old_tests directory
This commit is contained in:
parent
efad58a2af
commit
aab944fb6c
@ -6,12 +6,12 @@ GET /version HTTP/1.1
|
|||||||
|
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
CONNECTION: close
|
CONNECTION: close
|
||||||
CONTENT-LENGTH: 31
|
CONTENT-LENGTH: 29
|
||||||
CONTENT-TYPE: application/json
|
CONTENT-TYPE: application/json
|
||||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
||||||
SERVER: Python/3.4 aiohttp/0.13.1
|
SERVER: Python/3.4 aiohttp/0.13.1
|
||||||
X-ROUTE: /version
|
X-ROUTE: /version
|
||||||
|
|
||||||
{
|
{
|
||||||
"version": "1.2.2.dev2"
|
"version": "1.3.dev1"
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
curl -i -xPOST 'http://localhost:8000/version' -d '{"version": "1.2.2.dev2"}'
|
curl -i -xPOST 'http://localhost:8000/version' -d '{"version": "1.3.dev1"}'
|
||||||
|
|
||||||
POST /version HTTP/1.1
|
POST /version HTTP/1.1
|
||||||
{
|
{
|
||||||
"version": "1.2.2.dev2"
|
"version": "1.3.dev1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
CONNECTION: close
|
CONNECTION: close
|
||||||
CONTENT-LENGTH: 31
|
CONTENT-LENGTH: 29
|
||||||
CONTENT-TYPE: application/json
|
CONTENT-TYPE: application/json
|
||||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
||||||
SERVER: Python/3.4 aiohttp/0.13.1
|
SERVER: Python/3.4 aiohttp/0.13.1
|
||||||
X-ROUTE: /version
|
X-ROUTE: /version
|
||||||
|
|
||||||
{
|
{
|
||||||
"version": "1.2.2.dev2"
|
"version": "1.3.dev1"
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
__all__ = ['version_handler', 'vpcs_handler']
|
@ -33,9 +33,8 @@ from .web.route import Route
|
|||||||
from .config import Config
|
from .config import Config
|
||||||
from .modules import MODULES
|
from .modules import MODULES
|
||||||
|
|
||||||
#FIXME: have something generic to automatically import handlers so the routes can be found
|
#TODO: get rid of * have something generic to automatically import handlers so the routes can be found
|
||||||
from .handlers.version_handler import VersionHandler
|
from gns3server.handlers import *
|
||||||
from .handlers.vpcs_handler import VPCSHandler
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
@ -51,7 +51,7 @@ def test_version_invalid_input_schema(server):
|
|||||||
assert response.status == 400
|
assert response.status == 400
|
||||||
|
|
||||||
|
|
||||||
@asyncio_patch("demoserver.handlers.version_handler.VersionHandler", return_value={})
|
@asyncio_patch("gns3server.handlers.version_handler.VersionHandler", return_value={})
|
||||||
def test_version_invalid_output_schema():
|
def test_version_invalid_output_schema():
|
||||||
query = {'version': "0.4.2"}
|
query = {'version': "0.4.2"}
|
||||||
response = server.post('/version', query)
|
response = server.post('/version', query)
|
||||||
|
Loading…
Reference in New Issue
Block a user