def run_tests(self, test_labels, extra_tests=None, **kwargs):
        test_labels = test_labels or self.get_test_labels()
        self.setup_test_environment()
        full_suite = self.build_suite(test_labels, extra_tests)
        simple_suite, db_suite = self.split_suite(full_suite)
        failures = 0
        if simple_suite.countTestCases():
            failures += self.run_non_db_tests(simple_suite)

        if failures and self.failfast:
            return failures

        if db_suite.countTestCases():
            failures += self.run_db_tests(db_suite)
            self.print_test_times(db_suite)
        self.teardown_test_environment()
        return failures
Run the unit tests in two groups, those that don't need db access
dataset/ETHPy150Open dimagi/commcare-hq/testrunner.py/TwoStageTestRunner.run_tests