Created
September 10, 2013 11:24
-
-
Save OliverUv/6508050 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
from selenium import webdriver | |
import unittest | |
import subprocess | |
class TestTwuttur(unittest.TestCase): | |
def setUp(self): | |
self.browser = webdriver.Firefox() | |
def tearDown(self): | |
self.browser.quit() | |
def test_title(self): | |
self.browser.get('http://localhost:8001/') | |
self.assertIn('Twuttur.', self.browser.title) | |
if __name__ == '__main__': | |
server = subprocess.Popen(['python', '-m', 'SimpleHTTPServer', '8001']) | |
unittest.main(verbosity=2) | |
server.terminate() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment