The routine to determine which files to check for candidacies, when
used to analyze files being changed with --HEAD, should only test
those files if they are being kept by the change. If they're being
deleted, then there is no reason to test them. Further, testing
files which are slated for removal makes it basically impossible to
revert a previously merged candidacy which has since been
invalidated (for example, by resigning OSF Individual Membership).
Mock os.path.exists in test_find_modified_candidate_files_all_good
to just return True, since we aren't actually creating the file in
that test.
Change-Id: I4d5d9b1d55379adfd1c7d7765324306abf40cdb7
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.
Change-Id: I0b5e9e60b00204f938d23fc4ff8e020ebb4afa43
When creating a new election we need to add a directory per project
(including the 'TC' as a pseudo project) we can't just create an empty
directory in git so we add a '.placeholder' file.
We have recently added a voting job that will run try to validate all
candidate files added in a review. This includes the placeholder file.
CLearly this file will not pass validation and cause the job to fail.
Adding .placeholder to the zuul irrelevant-files variable wont work, so
instead filter .placeholder from the interesting files.
Change-Id: Ibd2224a5479d4ab9afbac227bac38080359a98bf