Skip to content

Instantly share code, notes, and snippets.

@ralphbean
Forked from moschlar/test_site.py
Created June 14, 2012 14:41
Show Gist options
  • Save ralphbean/2930755 to your computer and use it in GitHub Desktop.
Save ralphbean/2930755 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