/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_cache.py

Don't modify dictionary during iteration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
        self.map.start_write_group()
71
71
        updater = self.cache.get_updater(Revision("myrevid"))
72
72
        c = self._get_test_commit()
73
 
        updater.add_object(c, {
74
 
            "testament3-sha1": "cc9462f7f8263ef5adf8eff2fb936bb36b504cba"},
75
 
            None)
 
73
        updater.add_object(c, None, None)
76
74
        updater.finish()
77
75
        self.map.commit_write_group()
78
76
        self.assertEquals(
79
 
            ("commit", ("myrevid",
80
 
                "cc9462f7f8263ef5adfbeff2fb936bb36b504cba",
81
 
                {"testament3-sha1": "cc9462f7f8263ef5adf8eff2fb936bb36b504cba"},
82
 
                )),
 
77
            ("commit", ("myrevid", "cc9462f7f8263ef5adfbeff2fb936bb36b504cba")),
83
78
            self.map.lookup_git_sha(c.id))
84
79
        self.assertEquals(c.id, self.map.lookup_commit("myrevid"))
85
80
 
90
85
    def test_blob(self):
91
86
        self.map.start_write_group()
92
87
        updater = self.cache.get_updater(Revision("myrevid"))
93
 
        updater.add_object(self._get_test_commit(), { "testament3-sha1": "Test" }, None)
 
88
        updater.add_object(self._get_test_commit(), None, None)
94
89
        b = Blob()
95
90
        b.data = "TEH BLOB"
96
91
        ie = InventoryFile("myfileid", "somename", ROOT_ID)
107
102
    def test_tree(self):
108
103
        self.map.start_write_group()
109
104
        updater = self.cache.get_updater(Revision("myrevid"))
110
 
        updater.add_object(self._get_test_commit(), {
111
 
            "testament3-sha1": "mytestamentsha" }, None)
 
105
        updater.add_object(self._get_test_commit(), None, None)
112
106
        t = Tree()
113
107
        t.add(stat.S_IFREG, "somename", Blob().id)
114
108
        ie = InventoryDirectory("fileid", "myname", ROOT_ID)
129
123
        self.map.start_write_group()
130
124
        updater = self.cache.get_updater(Revision("myrevid"))
131
125
        c = self._get_test_commit()
132
 
        updater.add_object(c, {"testament3-sha1": "mtestament"}, None)
 
126
        updater.add_object(c, None, None)
133
127
        updater.finish()
134
128
        self.map.commit_write_group()
135
129
        self.assertEquals(["myrevid"], list(self.map.revids()))
138
132
        self.map.start_write_group()
139
133
        updater = self.cache.get_updater(Revision("myrevid"))
140
134
        c = self._get_test_commit()
141
 
        updater.add_object(c, {"testament3-sha1": "testament"}, None)
 
135
        updater.add_object(c, None, None)
142
136
        updater.finish()
143
137
        self.map.commit_write_group()
144
138
        self.assertEquals(set(["lala", "bla"]),