def test_is_matching_file_mismatch_filename(self): existing_file = create_file(file_name='file.1', md5='1bc29b36f623ba82aaf6724fd3b16718', sha1='415ab40ae9b7cc4e66d6769cb2c08106e8293b48', sha256='5d5b09f6dcb2d53a5fffc60c4ac0d55fabdf556069d6631545f42aa6e3500f2e') new_file = create_file(file_name='file.2', md5='1bc29b36f623ba82aaf6724fd3b16718', sha1='415ab40ae9b7cc4e66d6769cb2c08106e8293b48', sha256='5d5b09f6dcb2d53a5fffc60c4ac0d55fabdf556069d6631545f42aa6e3500f2e') self.assertFalse(_is_matching_file(existing_file, new_file), "Shouldn't have matched")
def test_is_matching_file_match_sha256(self): existing_file = create_file(file_name='file.1', sha256='5d5b09f6dcb2d53a5fffc60c4ac0d55fabdf556069d6631545f42aa6e3500f2e') new_file = create_file(file_name='file.1', sha256='5d5b09f6dcb2d53a5fffc60c4ac0d55fabdf556069d6631545f42aa6e3500f2e') self.assertTrue(_is_matching_file(existing_file, new_file), "Should have matched")
def test_is_matching_file_match_sha1(self): existing_file = create_file(file_name='file.1', sha1='415ab40ae9b7cc4e66d6769cb2c08106e8293b48') new_file = create_file(file_name='file.1', sha1='415ab40ae9b7cc4e66d6769cb2c08106e8293b48') self.assertTrue(_is_matching_file(existing_file, new_file), "Should have matched")
def test_is_matching_file_match_md5(self): existing_file = create_file(file_name='file.1', md5='1bc29b36f623ba82aaf6724fd3b16718') new_file = create_file(file_name='file.1', md5='1bc29b36f623ba82aaf6724fd3b16718') self.assertTrue(_is_matching_file(existing_file, new_file), "Should have matched")
def test_is_matching_file_mismatch_sha256(self): existing_file = create_file(file_name='file.1', sha256='5d5b09f6dcb2d53a5fffc60c4ac0d55fabdf556069d6631545f42aa6e3500f2e') new_file = create_file(file_name='file.1', sha256='f1375dbd646b47651d1a5f9e4c0868c61bd622d65e35e1f5f4c7e3afb00e47b5') self.assertFalse(_is_matching_file(existing_file, new_file), "Shouldn't have matched")
def test_is_matching_file_mismatch_sha1(self): existing_file = create_file(file_name='file.1', sha1='415ab40ae9b7cc4e66d6769cb2c08106e8293b48') new_file = create_file(file_name='file.1', sha1='3e65819230df66ec6f55427a242a2ff11c7d7884') self.assertFalse(_is_matching_file(existing_file, new_file), "Shouldn't have matched")
def test_is_matching_file_mismatch_md5(self): existing_file = create_file(file_name='file.1', md5='1bc29b36f623ba82aaf6724fd3b16718') new_file = create_file(file_name='file.1', md5='4e2dcf9208454aebce7ed56e93c67d78') self.assertFalse(_is_matching_file(existing_file, new_file), "Shouldn't have matched")