【发布时间】:2024-01-14 09:34:01
【问题描述】:
我有以下 tests.py 文件:
from django.test import TestCase
from lxml import etree
import tempfile
import utils
class CreateSurveyFromCsvTextTests(TestCase):
def parsesSurveyPassedInAsCsvAndReturnsXmlRepresentation(self):
text = """"survey",,,,,
,"name","type","label","hint","required"
,"gps","geopoint","Record your current location",,"false"
,"start","start",,,
,"end","end",,,
"settings",
,"form_title"
,"New survey" """
xml = create_survey_from_csv_text(text)
lxml.fromstring(xml)
当我使用python manage.py test 运行我的模块时,输出是
在 0.000 秒内运行 0 次测试
我知道跑步者正在获取文件,因为如果我进行了无效的导入,它会引发错误。
为什么没有调用测试?
【问题讨论】:
标签: python django django-testing django-tests