Skip to content

Instantly share code, notes, and snippets.

@mineta
Last active June 2, 2018 18:18
Show Gist options
  • Save mineta/ab387a5132950cfdbc6f to your computer and use it in GitHub Desktop.
Save mineta/ab387a5132950cfdbc6f to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
from selenium import webdriver
import unittest
class NewVisitorTest(unittest.TestCase):
def setUp(self):
self.browser = webdriver.Firefox()
self.browser.implicitly_wait(3)
def tearDown(self):
self.browser.quit()
def test_it_worked(self):
self.browser.get('http://localhost:8000')
self.assertIn('Welcome to Django', self.browser.title)
if __name__ == '__main__':
unittest.main(warnings='ignore')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment