#!/usr/bin/env python """ Integration test for the producer module. """ import os from communicator import Communicator from consumerlocator import ConsumerLocator from messagesender import MessageSender from redisconnector import RedisConnector from pytest_redis import factories __author__ = "@dscharnitzky" __copyright__ = "Copyright 2020, GoldenPogácsa Team" __module_name__ = "integtest" __version__text__ = "1" generateduuid = '2fbff1f2-27e7-44c8-88d9-7348cee8c1c3' redis_proc = factories.redis_proc(host='cache', port=6379) redis_db = factories.redisdb('redis_nooproc') KNOWNCONSUMER = os.getenv("PRODUCER_KNOWNCONSUMER", '10.69.42.1') def test_integration(mocker): """ Tests the whole system. :param mocker: patches the :class:`communicator.Communicator`. """ communicator = Communicator(currentconsumer=KNOWNCONSUMER, uuid=generateduuid) messagesender = MessageSender(communicator=communicator, uuid=generateduuid) consumerlocator = ConsumerLocator(uuid=generateduuid, communicator=communicator, redisconnector=RedisConnector())