conftest.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:django-email-pal 作者: 18F 项目源码 文件源码
def init_django():
    # Making Django run this way is a two-step process. First, call
    # settings.configure() to give Django settings to work with:
    from django.conf import settings
    settings.configure(**SETTINGS_DICT)

    # Then, call django.setup() to initialize the application cache
    # and other bits:
    import django
    django.setup()


# Originally we defined this as a session-scoped fixture, but that
# broke django.test.SimpleTestCase instances' class setup methods,
# so we need to call this function *really* early.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号