test_integrates_with_django_testrunner.py 文件源码

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

项目:django-performance-testing 作者: PaesslerAG 项目源码 文件源码
def test_runner_sets_executing_test_method_as_context():

    class SomeTestCase(unittest.TestCase):
        def test_foo(self):
            assert 'test name' in ctx.data, ctx.data.keys()
            tests = ctx.data['test name']
            assert len(tests) == 1
            assert [str(self)] == tests

    with override_current_context() as ctx:
        run_testcases_with_django_runner(SomeTestCase, nr_of_tests=1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号