Beispiel #1
0
async def test_get_confluent_kafka_settings():
    kafka_resource = KafkaResource()
    settings = mock.MagicMock()
    settings.get = AsyncMock()
    kafka_resource.settings = settings
    settings_response = await kafka_resource.get_confluent_kafka_settings()
    assert isinstance(settings_response, dict)
Beispiel #2
0
async def test_consumer_offset_false():
    kafka_resource = KafkaResource(offset_reset=False)
    kafka_resource.settings = AsyncDict()
    kafka_resource.settings["bootstrap_servers"] = "127.0.0.1"
    settings = await kafka_resource.get_confluent_kafka_settings()
    assert "auto.offset.reset" not in settings