Skip to content

Instantly share code, notes, and snippets.

@ChristinaMeno
Created March 15, 2011 11:11
Show Gist options
  • Save ChristinaMeno/870599 to your computer and use it in GitHub Desktop.
Save ChristinaMeno/870599 to your computer and use it in GitHub Desktop.
def get_required_databases(suite):
""" given a test suite, return all the databases that
these testcase-classes publish as requirements
"""
required_databases = []
for testclass in set([x.__class__ for x in suite._tests]):
required_databases.extend(db_requirements(testclass)
return list(set(required_databases))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment