Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def assertMerged(self, local, remote, **kwargs):
db.merge_left('annotations', local, remote, **kwargs)
self.assertEqual(local, remote)
def test_rough_equality_hamming_true(self):
""" When hamming=True, rough equivalents are not duplicated. """
remote = {'annotations': ['\n testing \n']}
db.merge_left('annotations', self.issue_dict, remote, hamming=True)
self.assertEqual(len(self.issue_dict['annotations']), 1)
def test_rough_equality_hamming_false(self):
""" When hamming=False, rough equivalents are duplicated. """
remote = {'annotations': ['\n testing \n']}
db.merge_left('annotations', self.issue_dict, remote, hamming=False)
self.assertEqual(len(self.issue_dict['annotations']), 2)