예제 #1
0
    def test_directory_not_exists(self):
        """ Tests exists with a invalid directory as an input. """

        path = "test/t2"

        with self.assertRaises(phishingpage.TemplateNotAvailable):
            phishingpage.exists(path)
예제 #2
0
    def test_directory_not_exists(self):
        """ Tests exists with a invalid directory as an input. """

        path = "test/t2"

        with self.assertRaises(phishingpage.TemplateNotAvailable):
            phishingpage.exists(path)
예제 #3
0
    def test_directory_valid_with_space(self):
        """
        Tests exists with a valid directory with spaces in it's name as
        an input.
        """

        path = "test/t 2"

        os.makedirs(path)

        with self.assertRaises(phishingpage.TemplateNotAvailable):
            phishingpage.exists(path)

        os.rmdir(path)
예제 #4
0
    def test_directory_valid_with_space(self):
        """
        Tests exists with a valid directory with spaces in it's name as
        an input.
        """

        path = "test/t 2"

        os.makedirs(path)

        with self.assertRaises(phishingpage.TemplateNotAvailable):
            phishingpage.exists(path)

        os.rmdir(path)
예제 #5
0
    def test_directory_exists(self):
        """ Tests exists with a valid directory as an input. """

        path = "test/linksys"

        os.makedirs(path)

        self.assertEqual(phishingpage.exists(path), True,
                         "Failed to find a correct directory!")
        os.rmdir(path)
예제 #6
0
    def test_directory_exists(self):
        """ Tests exists with a valid directory as an input. """

        path = "test/linksys"

        os.makedirs(path)

        self.assertEqual(phishingpage.exists(path), True,
                         "Failed to find a correct directory!")
        os.rmdir(path)