예제 #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
예제 #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
예제 #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)
예제 #4
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)
예제 #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)
예제 #6
0
파일: test_django.py 프로젝트: LiiiQin/test
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)
예제 #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)
예제 #8
0
 def tearDown(self):
     replace_dict(self.old_aliases, pyamf.ALIAS_TYPES)
예제 #9
0
    def tearDown(self):
        PostLoadHookClearingTestCase.tearDown(self)

        del sys.path[0]

        _util.replace_dict(self.mods, sys.modules)
예제 #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)
예제 #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)
예제 #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)
예제 #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)