-
-
Save ralphbean/2930755 to your computer and use it in GitHub Desktop.
Test multiple sites
This file contains 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
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