예제 #1
0
    def test_model_support_zipfile_no_zip_path(self):
        """
        Tests a few conditions of our App.support_zipfile() method to ensure that
        it returns False when the zip path isn't configured
        """
        # Should start out True
        self.assertEqual(App.support_zipfile(), True)

        # Return false when the configured path is blank
        self.prefs['exordium__zipfile_path'] = ''
        self.assertEqual(App.support_zipfile(), False)
예제 #2
0
    def test_model_support_zipfile_no_zip_dir(self):
        """
        Tests a few conditions of our App.support_zipfile() method to ensure that
        it returns False when the zip dir doesn't exist.
        """
        # Should start out True
        self.assertEqual(App.support_zipfile(), True)

        # Should return False if we're configured but the zip dir doesn't
        # actually exist
        shutil.rmtree(self.zipfile_path)
        self.assertEqual(App.support_zipfile(), False)