mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-01 19:37:54 +00:00
Added comments
This commit is contained in:
@@ -15,6 +15,8 @@ class TestUcentralGatewayService(object):
|
||||
@pytest.mark.sdk_restapi
|
||||
def test_gwservice_listdevices(self, setup_controller):
|
||||
"""
|
||||
Test the list devices endpoint
|
||||
WIFI-3452
|
||||
"""
|
||||
resp = setup_controller.request("gw", "devices", "GET", None, None)
|
||||
body = resp.url + "," + str(resp.status_code) + ',' + resp.text
|
||||
@@ -27,6 +29,8 @@ class TestUcentralGatewayService(object):
|
||||
@pytest.mark.sdk_restapi
|
||||
def test_gwservice_createdevice(self, setup_controller):
|
||||
"""
|
||||
Test the create device endpoint
|
||||
WIFI-3453
|
||||
"""
|
||||
configuration = {'uuid': '1'}
|
||||
payload = {'serialNumber': 'DEADBEEF0011',
|
||||
@@ -61,6 +65,8 @@ class TestUcentralGatewayService(object):
|
||||
@pytest.mark.sdk_restapi
|
||||
def test_gwservice_updatedevice(self, setup_controller):
|
||||
"""
|
||||
Test the update device endpoint
|
||||
WIFI-3454
|
||||
"""
|
||||
configuration = {'uuid': '1'}
|
||||
payload = {'serialNumber': 'DEADBEEF0011',
|
||||
@@ -102,3 +108,34 @@ class TestUcentralGatewayService(object):
|
||||
allure.attach(name="gw get device", body=body)
|
||||
if resp.status_code != 200:
|
||||
assert False
|
||||
|
||||
@pytest.mark.sdk_restapi
|
||||
def test_gwservice_deletedevice(self, setup_controller):
|
||||
"""
|
||||
Test the delete device endpoint
|
||||
WIFI-3455
|
||||
"""
|
||||
configuration = {'uuid': '1'}
|
||||
payload = {'serialNumber': 'DEADBEEF0011',
|
||||
'UUID': '123456',
|
||||
'configuration': configuration,
|
||||
'deviceType': 'AP',
|
||||
'location': '',
|
||||
'macAddress': 'DE:AD:BE:EF:00:11',
|
||||
'manufacturer': 'Testing',
|
||||
'owner': ''}
|
||||
resp = setup_controller.request("gw", "device/DEADBEEF0011", "POST", None, json.dumps(payload))
|
||||
body = resp.url + "," + str(resp.status_code) + ',' + resp.text
|
||||
allure.attach(name="gw create devices", body=body)
|
||||
if resp.status_code != 200:
|
||||
assert False
|
||||
devices = json.loads(resp.text)
|
||||
print (devices)
|
||||
|
||||
|
||||
resp = setup_controller.request("gw", "device/DEADBEEF0011", "DELETE", None, None)
|
||||
body = resp.url + "," + str(resp.status_code) + ',' + resp.text
|
||||
allure.attach(name="gw get device", body=body)
|
||||
if resp.status_code != 200:
|
||||
assert False
|
||||
|
||||
|
||||
@@ -11,7 +11,8 @@ import allure
|
||||
|
||||
class TestUcentralSecService(object):
|
||||
"""
|
||||
pytest -m "uci_login or uci_logout"
|
||||
Test the oauth endpoint
|
||||
WIFI-3447
|
||||
"""
|
||||
@pytest.mark.sdk_restapi
|
||||
def test_secservice_oauth(self, setup_controller):
|
||||
@@ -26,7 +27,8 @@ class TestUcentralSecService(object):
|
||||
@pytest.mark.sdk_restapi
|
||||
def test_secservice_oauth_revoke(self, setup_controller):
|
||||
"""
|
||||
pytest -m "uci_logout"
|
||||
Test the oauth revoke endpoint
|
||||
WIFI-3448
|
||||
"""
|
||||
resp = setup_controller.logout()
|
||||
body = resp.url + "," + str(resp.status_code) + ',' + resp.text
|
||||
@@ -37,8 +39,8 @@ class TestUcentralSecService(object):
|
||||
@pytest.mark.sdk_restapi
|
||||
def test_secservice_system_endpoints(self, setup_controller):
|
||||
"""
|
||||
pytest -m "uci_endpoints"
|
||||
look for ucentralgw and ucentralfms services for 2.1 release
|
||||
Test the system endpoints to verify list of services present
|
||||
WIFI-3449
|
||||
"""
|
||||
resp = setup_controller.request("sec", "systemEndpoints", "GET", None, None)
|
||||
body = resp.url + "," + str(resp.status_code) + ',' + resp.text
|
||||
@@ -74,8 +76,8 @@ class TestUcentralSecService(object):
|
||||
@pytest.mark.sdk_restapi
|
||||
def test_secservice_get_version(self, setup_controller):
|
||||
"""
|
||||
pytest -m "uci_endpoints"
|
||||
look for ucentralgw and ucentralfms services for 2.1 release
|
||||
Test the system endpoint to verify the version of the service
|
||||
WIFI-3450
|
||||
"""
|
||||
|
||||
params = {'command': 'version'}
|
||||
@@ -97,7 +99,8 @@ class TestUcentralSecService(object):
|
||||
@pytest.mark.sdk_restapi
|
||||
def test_secservice_get_uptime(self, setup_controller):
|
||||
"""
|
||||
look for ucentralgw and ucentralfms services for 2.1 release
|
||||
Test the system endpoint to verify the uptime of the service
|
||||
WIFI-3451
|
||||
"""
|
||||
|
||||
params = {'command': 'times'}
|
||||
|
||||
Reference in New Issue
Block a user