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)
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)
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)