OpenBazaar/OpenBazaar — pull request #103 by julianknutsen (2014-07-08 07:23:48+00:00)
Title: Clean up transport layer

Started to clean up the TransportLayer code.

Some minor testing uncovered quite a few layer violations in the existing code:

o PeerConnection referencing method only available in CryptoPeerConnection (on_message)
o TransportLayer referencing method only available in CryptoTransportLayer (init_peer)
o TransportLayer referencing CryptoPeerConnection

This pull request is the beginning of the detangle. I think there is one more set of system level tests that can be created. It seems like behave might be the right framework and there is already and existing CrytpoTransportLayer using that framework.

This passes ./run_tests.sh && behave (except for websocket timeouts)

I also added a dependency to the python module 'mock' `pip install mock` to aid in testing. Nothing too fancy.