def test_sum2(self): range1 = self.create_range(self.cs2, self.cs3) range2 = self.create_range(self.cs4, self.cs5) sum = Sum(range1.calc_changes(), range2.calc_changes()) sum.detect_conflict() self.assert_false(sum.is_conflicting()) changes = sum.calc_changes() self.assert_equal(len(changes), 1) self.assert_equal(changes[0].new['name'], 'namethree') self.assert_equal(changes[0].new['title'], 'Title Three')
def test_sum1(self): range1 = self.create_range(self.cs0, self.cs1) range2 = self.create_range(self.cs1, self.cs1) sum = Sum(range1.calc_changes(), range2.calc_changes()) self.assert_raises(ConflictException, sum.detect_conflict) self.assert_true(sum.is_conflicting())