| 1 |
from errbot.backends.test import TestOccupant, TestPerson |
| 2 |
|
| 3 |
|
| 4 |
def test_identifier_eq(): |
| 5 |
a = TestPerson("foo") |
| 6 |
b = TestPerson("foo") |
| 7 |
assert a == b |
| 8 |
|
| 9 |
|
| 10 |
def test_identifier_ineq(): |
| 11 |
a = TestPerson("foo") |
| 12 |
b = TestPerson("bar") |
| 13 |
assert not a == b |
| 14 |
assert a != b |
| 15 |
|
| 16 |
|
| 17 |
def test_mucidentifier_eq(): |
| 18 |
a = TestOccupant("foo", "room") |
| 19 |
b = TestOccupant("foo", "room") |
| 20 |
assert a == b |
| 21 |
|
| 22 |
|
| 23 |
def test_mucidentifier_ineq1(): |
| 24 |
a = TestOccupant("foo", "room") |
| 25 |
b = TestOccupant("bar", "room") |
| 26 |
assert not a == b |
| 27 |
assert a != b |
| 28 |
|
| 29 |
|
| 30 |
def test_mucidentifier_ineq2(): |
| 31 |
a = TestOccupant("foo", "room1") |
| 32 |
b = TestOccupant("foo", "room2") |
| 33 |
assert not a == b |
| 34 |
assert a != b |