示例#1
0
class EraserTest(unittest.TestCase):

    def setUp(self):
        self.eraser = Eraser(email, password)

    def test_setup(self):
        self.assertIsInstance(self.eraser.driver, webdriver.Firefox)

    def test_login_function(self):
        """
        Login and check the title of the page
        :return:
        """
        self.eraser.login()
        self.assertTrue('Facebook' in self.eraser.driver.title)

    def tearDown(self):
        self.eraser.quit()
示例#2
0
 def setUp(self):
     self.eraser = Eraser(email, password)