我有以下 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 次测试
我知道跑步者正在拾取文件,因为如果我进行无效导入,它会引发错误。
为什么不调用测试?