def test_iot_digitaltwin_interface_list_error(self, fixture_cmd, serviceclient_generic_error, exp): with pytest.raises(exp): subject.iot_digitaltwin_interface_list(fixture_cmd, device_id=device_id, login=mock_target['cs'])
def test_iot_digitaltwin_interface_list(self, fixture_cmd, serviceclient): result = subject.iot_digitaltwin_interface_list( fixture_cmd, device_id=device_id, login=mock_target['cs']) args = serviceclient.call_args url = args[0][0].url method = args[0][0].method assert method == 'GET' assert '{}/digitalTwins/{}/interfaces/{}?'.format( mock_target['entity'], device_id, INTERFACE_KEY_NAME) in url assert json.dumps(result) assert len(result['interfaces']) == 3