mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-02 11:57:49 +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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user