Beispiel #1
0
def test_discover():
    a = Comm()
    b = Comm()
    a.listen()
    a.advertise("a_test")
    res = b.discover()

    assert len(res) >= 1

    a.stopAdvertising()
Beispiel #2
0
def test_discover():
    a = Comm()
    b = Comm()
    a.listen()
    a.advertise("a_test")
    res = b.discover()

    assert len(res) >= 1

    a.stopAdvertising()
Beispiel #3
0
def test_discover_specific():
    a = Comm()
    b = Comm()
    c = Comm()
    a.listen()
    c.listen()
    a.advertise("b_test")
    c.advertise("other_test")
    res = b.discover("b_test")

    assert len(res) == 1

    a.stopAdvertising()
Beispiel #4
0
def test_discover_specific():
    a = Comm()
    b = Comm()
    c = Comm()
    a.listen()
    c.listen()
    a.advertise("b_test")
    c.advertise("other_test")
    res = b.discover("b_test")

    assert len(res) == 1

    a.stopAdvertising()