Skip to content

Instantly share code, notes, and snippets.

@OliverUv
Created September 10, 2013 11:24
Show Gist options
  • Save OliverUv/6508050 to your computer and use it in GitHub Desktop.
Save OliverUv/6508050 to your computer and use it in GitHub Desktop.
#!/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