def test_instantiates_with_connection_string_no_shared_access_key(self):
     connection_string = "HostName={hostname};DeviceId={device_id};SharedAccessKeyName={skn}".format(
         hostname=fake_hostname,
         device_id=fake_device_id,
         skn=fake_shared_access_key_name)
     with pytest.raises(ValueError):
         IoTHubHttpRuntimeManager(connection_string)
 def test_instantiates_with_connection_string_no_device_id(self):
     connection_string = "HostName={hostname};SharedAccessKeyName={skn};SharedAccessKey={sk}".format(
         hostname=fake_hostname,
         skn=fake_shared_access_key_name,
         sk=fake_shared_access_key)
     obj = IoTHubHttpRuntimeManager(connection_string)
     assert isinstance(obj, IoTHubHttpRuntimeManager)
 def test_instantiates_with_connection_string_no_host_name(self):
     connection_string = (
         "DeviceId={device_id};SharedAccessKeyName={skn};SharedAccessKey={sk}"
         .format(device_id=fake_device_id,
                 skn=fake_shared_access_key_name,
                 sk=fake_shared_access_key))
     with pytest.raises(ValueError):
         IoTHubHttpRuntimeManager(connection_string)
def iothub_http_runtime_manager():
    connection_string = "HostName={hostname};DeviceId={device_id};SharedAccessKeyName={skn};SharedAccessKey={sk}".format(
        hostname=fake_hostname,
        device_id=fake_device_id,
        skn=fake_shared_access_key_name,
        sk=fake_shared_access_key,
    )
    iothub_http_runtime_manager = IoTHubHttpRuntimeManager(connection_string)
    return iothub_http_runtime_manager
 def test_instantiates_with_empty_connection_string(self):
     with pytest.raises(ValueError):
         IoTHubHttpRuntimeManager("")