def hexdigest(data): return hash_canonical(data).hexdigest()
def test__canonicalizes_argument(self): describe_canonical = self.patch(doc_module, "describe_canonical") describe_canonical.return_value = "" hash_canonical(sentinel.desc) self.assertThat(describe_canonical, MockCalledOnceWith(sentinel.desc))