Exemple #1
0
def test_emission_link():
    interface = TestInterface()
    generator = EmptyGenerator()
    mixer = AdditionMixer(generator)
    encryption = DummyEncryption()
    emitter = DummyEmitter()

    interface.output = mixer
    generator.output = mixer
    mixer.output = encryption
    encryption.output = emitter
Exemple #2
0
def main():
    interface = WebInterface()
    generator = EmptyGenerator()
    mixer = AdditionMixer()
    encryption = DummyEncryption()
    emitter = WebAppEmitter('http://localhost:8081/api')

    contacts = TestContacts()

    interface.output = mixer
    generator.output = mixer
    mixer.output = encryption
    encryption.output = emitter

    interface.contacts = contacts

    interface.run()
Exemple #3
0
def test_emission_flow():
    interface = TestInterface()
    generator = EmptyGenerator()
    mixer = AdditionMixer(generator)
    encryption = DummyEncryption()
    emitter = DummyEmitter()

    interface.output = mixer
    generator.output = mixer
    mixer.output = encryption
    encryption.output = emitter

    contacts = TestContacts()

    generator.gen()

    recipient = contacts['Bob']
    date = time.time()
    interface.send_message(recipient, 'Hello Bob !', date)
Exemple #4
0
Fichier : cli.py Projet : hoh/Vega
def main():
    interface = CLIInterface()
    generator = FixedIntervalGenerator()
    mixer = AdditionMixer(generator)
    encryption = DummyEncryption()
    emitter = DummyEmitter()

    contacts = TestContacts()

    interface.output = mixer
    generator.output = mixer
    mixer.output = encryption
    encryption.output = emitter

    interface.contacts = contacts
    generator.contacts = contacts

    mixer.start_loop()
    interface.run()
Exemple #5
0
def main():
    adapter = PidginDBusAdapter()

    generator = FixedIntervalGenerator()
    mixer = AdditionMixer(generator)
    encryption = ClearTextEncryption()
    emitter = adapter

    contacts = TestContacts()

    adapter.output = mixer
    generator.output = mixer
    mixer.output = encryption
    encryption.output = emitter

    adapter.contacts = contacts
    generator.contacts = contacts

    print('foo')
    mixer.loop()
    #mixer.start_loop()
    adapter.run()