Skip to content

Instantly share code, notes, and snippets.

@keokilee
Created March 18, 2011 20:46
Show Gist options
  • Save keokilee/876805 to your computer and use it in GitHub Desktop.
Save keokilee/876805 to your computer and use it in GitHub Desktop.
Sample test.
import time, re
from noseselenium.cases import SeleniumTestCaseMixin
from django.test import TestCase
class sample_test(TestCase, SeleniumTestCaseMixin):
def setUp(self):
self.verificationErrors = []
def test_sample_test(self):
sel = self.selenium
sel.open("/")
try: self.failUnless(sel.is_text_present("Welcome"))
except AssertionError, e: self.verificationErrors.append(str(e))
def tearDown(self):
self.assertEqual([], self.verificationErrors)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment