Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 5387566

Browse files
author
Tom Galloway
committed
Initial test file for market.protocol.
1 parent 096ae95 commit 5387566

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

market/tests/test_protocol.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from twisted.trial import unittest
2+
3+
from market.protocol import MarketProtocol
4+
5+
class MarketProtocolTest(unittest.TestCase):
6+
def test_connect_multiplexer(self):
7+
mp = MarketProtocol(0, 0, 0, 0)
8+
self.assertEqual(mp.multiplexer, None)
9+
mp.connect_multiplexer("3")
10+
self.assertEqual(mp.multiplexer, "3")
11+
12+
def test_add_listener(self):
13+
mp = MarketProtocol(0, 0, 0, 0)
14+
self.assertEqual(len(mp.listeners), 0)
15+
mp.add_listener(3)
16+
self.assertEqual(len(mp.listeners),1)

0 commit comments

Comments
 (0)