Skip to content

Instantly share code, notes, and snippets.

@moschlar
Created June 14, 2012 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save moschlar/2930720 to your computer and use it in GitHub Desktop.
Save moschlar/2930720 to your computer and use it in GitHub Desktop.
Test multiple sites
from sauce.tests import TestController
__all__ = ['TestSite']
class TestSite(TestController):
sites = ['/', '/about', '/contact']
def _do_site(self, site):
response = self.app.get(site)
assert response.status.startswith('2')
def test_sites(self):
for site in self.sites:
yield self._do_site(site)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment