Esempio n. 1
0
    def test_equality(self):
        a = Label(self.id, self.name)
        b = Label(10, self.name)
        c = Label(self.id, '')
        d = Label(self.id, self.name)

        assert a != b != c
        assert hash(a) != hash(b) != hash(c)
        assert a is not b is not c

        assert a == d
Esempio n. 2
0
def label():
    return Label(TestLabel.id, TestLabel.name)
Esempio n. 3
0
def label(request):
    if request.param:
        return Label(TestLabel.id, TestLabel.name)

    return TestLabel.another_representation_of_label