コード例 #1
0
    def test_digestcompare_method(self):
        golden_sig = b'4U+ZV6b63EaA1GEOqlsRJSpFjOc='

        new_sig = b'4U+ZV6b63EaA1GEOqlsRJSpFjOc='
        self.assertTrue(XmlStorageBackend._compare_digest(golden_sig, new_sig))
        new_sig = '4U+ZV6b63EaA1GEOqlsRJSpFjOc='
        self.assertTrue(XmlStorageBackend._compare_digest(golden_sig, new_sig))
        new_sig = u'4U+ZV6b63EaA1GEOqlsRJSpFjOc='
        self.assertTrue(XmlStorageBackend._compare_digest(golden_sig, new_sig))