/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to tests/test_shamap.py

More tests for sha maps, fix cache misses in tdb.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
            self.map.lookup_git_sha, "5686645d49063c73d35436192dfc9a160c672301")
45
45
        
46
46
    def test_blob(self):
47
 
        self.map.add_entry("5686645d49063c73d35436192dfc9a160c672301", 
48
 
            "blob", ("myfileid", "myrevid"))
 
47
        thesha = "5686645d49063c73d35436192dfc9a160c672301"
 
48
        self.map.add_entry(thesha, "blob", ("myfileid", "myrevid"))
49
49
        self.assertEquals(
50
50
            ("blob", ("myfileid", "myrevid")),
51
 
            self.map.lookup_git_sha("5686645d49063c73d35436192dfc9a160c672301"))
 
51
            self.map.lookup_git_sha(thesha))
 
52
        self.assertEquals(thesha, self.map.lookup_blob("myfileid", "myrevid"))
52
53
 
53
54
    def test_tree(self):
54
 
        self.map.add_entry("5686645d49063c73d35436192dfc9a160c672301", 
 
55
        thesha = "5686645d49063c73d35436192dfc9a160c672301"
 
56
        self.map.add_entry(thesha, 
55
57
            "tree", ("somepath", "myrevid"))
56
58
        self.assertEquals(
57
59
            ("tree", ("somepath", "myrevid")),
58
 
            self.map.lookup_git_sha("5686645d49063c73d35436192dfc9a160c672301"))
 
60
            self.map.lookup_git_sha(thesha))
 
61
        self.assertEquals(thesha, self.map.lookup_tree("somepath", "myrevid"))
59
62
 
60
63
    def test_revids(self):
61
64
        self.map.add_entry("5686645d49063c73d35436192dfc9a160c672301",