Beispiel #1
0
    def tearDown(self):
        self.browser.quit()

        self.server.kill()

        if settings.CLEAN_UP_POLICY == settings.CLEAN_UP_POLICIES.REMOVE_DATABASE:
            remove_database_folder()
        elif settings.CLEAN_UP_POLICY == settings.CLEAN_UP_POLICIES.REMOVE_ELECTION:
            if self.election_id:
                remove_election_from_database(self.election_id)

        self.fake_sent_emails_manager.uninstall_fake_sendmail_log_file()
Beispiel #2
0
 def tearDown(self):
     self.browser.quit()
     if settings.START_SERVER:
         self.server.kill()
         if settings.CLEAN_UP_POLICY == settings.CLEAN_UP_POLICIES.REMOVE_DATABASE:
             remove_database_folder()
         elif settings.CLEAN_UP_POLICY == settings.CLEAN_UP_POLICIES.REMOVE_ELECTION:
             if self.election_id:
                 remove_election_from_database(self.election_id)
         elif settings.CLEAN_UP_POLICY == settings.CLEAN_UP_POLICIES.DO_NOTHING:
             pass
     self.fake_sent_emails_manager.uninstall_fake_sendmail_log_file()
     if self.distant_fake_sent_emails_manager is not None:
         self.distant_fake_sent_emails_manager.uninstall_fake_sendmail_log_file()