Example #1
0
    def tearDown(self):
        util.replace_dict(os.environ, self.old_env)
        util.replace_dict(sys.modules, self.mods)

        if self.existing:
            from django import conf
            conf.settings = self.mod
Example #2
0
    def tearDown(self):
        util.replace_dict(os.environ, self.old_env)
        util.replace_dict(sys.modules, self.mods)

        if self.existing:
            from django import conf
            conf.settings = self.mod
Example #3
0
def teadDownModule():
    # remove all the stuff that django installed
    teardown_test_environment()

    sys.path = context['sys.path']
    util.replace_dict(context['sys.modules'], sys.modules)
    util.replace_dict(context['os.environ'], os.environ)

    destroy_test_db(settings.DATABASE_NAME, 2)
def teadDownModule():
    # remove all the stuff that django installed
    teardown_test_environment()

    sys.path = context['sys.path']
    util.replace_dict(context['sys.modules'], sys.modules)
    util.replace_dict(context['os.environ'], os.environ)

    destroy_test_db(settings.DATABASE_NAME, 2)
Example #5
0
def tearDownModule():
    # remove all the stuff that django installed
    teardown_test_environment()

    sys.path = context['sys.path']
    util.replace_dict(context['sys.modules'], sys.modules)
    util.replace_dict(context['os.environ'], os.environ)

    destroy_test_db(settings.DATABASE_NAME, verbosity=0)

    rmtree(storage.location, ignore_errors=True)
Example #6
0
def tearDownModule():
    if not django:
        return

    # remove all the stuff that django installed
    if teardown_test_environment:
        teardown_test_environment()

    if destroy_test_db:
        destroy_test_db(context['DB_NAME'], verbosity=0)

    if storage:
        rmtree(storage.location, ignore_errors=True)

    sys.path = context['sys.path']
    util.replace_dict(context['sys.modules'], sys.modules)
    util.replace_dict(context['os.environ'], os.environ)
Example #7
0
def tearDownModule():
    if not django:
        return

    # remove all the stuff that django installed
    if teardown_test_environment:
        teardown_test_environment()

    if destroy_test_db:
        destroy_test_db(context['DB_NAME'], verbosity=0)

    if storage:
        rmtree(storage.location, ignore_errors=True)

    sys.path = context['sys.path']
    util.replace_dict(context['sys.modules'], sys.modules)
    util.replace_dict(context['os.environ'], os.environ)
Example #8
0
 def tearDown(self):
     replace_dict(self.old_aliases, pyamf.ALIAS_TYPES)
Example #9
0
    def tearDown(self):
        PostLoadHookClearingTestCase.tearDown(self)

        del sys.path[0]

        _util.replace_dict(self.mods, sys.modules)
Example #10
0
 def tearDown(self):
     replace_dict(self.old_aliases, pyamf.ALIAS_TYPES)
    def tearDown(self):
        ImportsTestCase.tearDown(self)

        util.replace_dict(os.environ, self.old_env)
        util.replace_dict(sys.modules, self.mods)
        sys.path.remove(self.path)
Example #12
0
    def tearDown(self):
        PostLoadHookClearingTestCase.tearDown(self)

        util.replace_dict(os.environ, self.old_env)
        util.replace_dict(sys.modules, self.mods)
        sys.path.remove(self.path)
Example #13
0
    def tearDown(self):
        PostLoadHookClearingTestCase.tearDown(self)

        util.replace_dict(os.environ, self.old_env)
        util.replace_dict(sys.modules, self.mods)
        sys.path.remove(self.path)
Example #14
0
    def tearDown(self):
        ImportsTestCase.tearDown(self)

        util.replace_dict(os.environ, self.old_env)
        util.replace_dict(sys.modules, self.mods)
        sys.path.remove(self.path)