ModuleNotFoundError:没有名为“上下文”的模块

时间:2020-06-30 15:11:06

标签: django testing

当我尝试运行pyVows测试时出现以下错误:

Traceback (most recent call last):
  File "C:\Program Files\Python38\lib\unittest\loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "C:\Program Files\Python38\lib\unittest\loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "D:\Programmierung\Python-Projekte\JourneyMap\JourneyMap\tests.py", line 2, in <module>
    from django_pyvows.context import DjangoHTTPContext
  File "C:\Users\malo0\AppData\Roaming\Python\Python38\site-packages\django_pyvows\__init__.py", line 11, in <module>
    from context import DjangoContext, DjangoHTTPContext
ModuleNotFoundError: No module named 'context'

我安装了pyVows and django-pyvows,我丢失了什么吗?我没有找到有用的文档

要求的编辑:

from pyvows import Vows, expect
from django_pyvows.context import DjangoHTTPContext

# Create your tests here.


@Vows.batch
class LanguageTest(Vows.Context):
    class LanguageSelectIntegrationTest(DjangoHTTPContext):
        def topic(self):
            return self.get('/')

        def test(self, topic):
            # Test will be here
            pass

0 个答案:

没有答案