예제 #1
0
    def test_hash_from_multiline_contents(self):
        data = "some data\nand some more data"
        hash = dotkeeper.hash_object(contents=data, git_dir = self._git_dir)
        assert hash == "65927aaf6dc83c89b5980b7da5344f9bd968fc28"

        got_data = dotkeeper.cat_file(hash, git_dir = self._git_dir)
        assert got_data == data
예제 #2
0
    def test_hash_fron_contents(self):
        data = "some data"
        hash = dotkeeper.hash_object(contents=data, git_dir = self._git_dir)
        assert hash == "7c0646bfd53c1f0ed45ffd81563f30017717ca58"

        got_data = dotkeeper.cat_file(hash, git_dir = self._git_dir)
        assert got_data == data