adding test of get version
This commit is contained in:
parent
3d171626f3
commit
aaaf118028
|
@ -1,8 +1,10 @@
|
|||
import datetime
|
||||
import pkg_resources
|
||||
import pytest
|
||||
|
||||
from uuid import UUID
|
||||
from flask import g
|
||||
|
||||
import pytest
|
||||
from colour import Color
|
||||
from ereuse_utils.naming import Naming
|
||||
from ereuse_utils.test import ANY
|
||||
|
@ -116,6 +118,16 @@ def test_users(user: UserClient, client: Client):
|
|||
assert res.status_code == 405
|
||||
|
||||
|
||||
@pytest.mark.mvp
|
||||
def test_get_version(app: Devicehub, client: Client):
|
||||
"""Checks GETting versions of services."""
|
||||
|
||||
content, res = client.get("/versions/", None)
|
||||
dh_version = pkg_resources.require('ereuse-devicehub')[0].version
|
||||
version = {'devicehub': dh_version, 'ereuse_tag': '0.0.0'}
|
||||
assert res.status_code == 200
|
||||
assert content == version
|
||||
|
||||
@pytest.mark.mvp
|
||||
def test_get_device(app: Devicehub, user: UserClient, user2: UserClient):
|
||||
"""Checks GETting a d.Desktop with its components."""
|
||||
|
|
Reference in New Issue