예제 #1
0
    def test_add(self):
        ac = ActiveConnections()

        c = MockConnection()

        ac.add(c)

        assert c in ac.connections
예제 #2
0
    def test_add(self):
        ac = ActiveConnections()

        c = MockConnection()

        ac.add(c)

        assert c in ac.connections
예제 #3
0
    def test_double_add(self):
        ac = ActiveConnections()

        c = MockConnection()

        ac.add(c)
        ac.add(c)

        assert c in ac.connections
        assert len(ac.connections) == 1
예제 #4
0
    def test_double_add(self):
        ac = ActiveConnections()

        c = MockConnection()

        ac.add(c)
        ac.add(c)

        assert c in ac.connections
        assert len(ac.connections) == 1