Exemplo n.º 1
0
    def test_equality(self):
        a = PassportElementErrorFiles(self.type_, self.file_hashes,
                                      self.message)
        b = PassportElementErrorFiles(self.type_, self.file_hashes,
                                      self.message)
        c = PassportElementErrorFiles(self.type_, '', '')
        d = PassportElementErrorFiles('', self.file_hashes, '')
        e = PassportElementErrorFiles('', '', self.message)
        f = PassportElementErrorSelfie(self.type_, '', self.message)

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

        assert a != c
        assert hash(a) != hash(c)

        assert a != d
        assert hash(a) != hash(d)

        assert a != e
        assert hash(a) != hash(e)

        assert a != f
        assert hash(a) != hash(f)
Exemplo n.º 2
0
def passport_element_error_files():
    return PassportElementErrorFiles(
        TestPassportElementErrorFiles.type_,
        TestPassportElementErrorFiles.file_hashes,
        TestPassportElementErrorFiles.message,
    )