Python 萨奇莫:这个错误是什么意思?它是如何修复的?
Ubuntu 13.04-Python 2.7.4-Django 1.4.5-Satchmo_商店0.9.3 当我运行Satchmo的第二次安装测试时,它向我显示了以下两个错误,在我看来这两个错误是相同的。不管怎样,我都不太明白它想告诉我什么,也不知道如何着手修复它--Python 萨奇莫:这个错误是什么意思?它是如何修复的?,python,django,satchmo,Python,Django,Satchmo,Ubuntu 13.04-Python 2.7.4-Django 1.4.5-Satchmo_商店0.9.3 当我运行Satchmo的第二次安装测试时,它向我显示了以下两个错误,在我看来这两个错误是相同的。不管怎样,我都不太明白它想告诉我什么,也不知道如何着手修复它-- root@10:/home/ubuntu/src/satchmo/scripts/store#python manage.py test 正在为别名“default”创建测试数据库。。。 失败:使用https请求测试站点地图索引
root@10:/home/ubuntu/src/satchmo/scripts/store#python manage.py test
正在为别名“default”创建测试数据库。。。
失败:使用https请求测试站点地图索引(django.contrib.sitemaps.tests.https.HTTPSDetectionSitemapTests)
HTTPS中请求的sitemap索引将使用HTTPS链接呈现
----------------------------------------------------------------------
回溯(最近一次呼叫最后一次):
文件“/usr/local/lib/python2.7/dist packages/django/contrib/sitemaps/tests/https.py”,第40行,在测试站点地图索引中,带有https请求
“%self.base\u url.replace('http://','https://'))
断言错误:“”!='\n\nhttps://example.com/simple/sitemap-simple.xml\n\n'
----------------------------------------------------------------------
在400.243秒内运行了646个测试
失败(失败=2,跳过=2)
正在销毁别名“default”的测试数据库。。。
root@10:/home/ubuntu/src/satchmo/scripts/store#
非常感谢您的帮助、见解和想法!谢谢!它告诉您emty字符串不等于此字符串:?xml version=“1.0”encoding=“UTF-8”?>\n\n\n 很可能是您的环境没有完全设置好,或者测试中有一个bug
root@10:/home/ubuntu/src/satchmo/scripts/store# python manage.py test
Creating test database for alias 'default'...
FAIL: test_sitemap_index_with_https_request (django.contrib.sitemaps.tests.https.HTTPSDetectionSitemapTests)
A sitemap index requested in HTTPS is rendered with HTTPS links
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/contrib/sitemaps/tests/https.py", line 40, in test_sitemap_index_with_https_request
""" % self.base_url.replace('http://', 'https://'))
AssertionError: '' != '<?xml version="1.0" encoding="UTF-8"?>\n<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n<sitemap><loc>https://example.com/simple/sitemap-simple.xml</loc></sitemap>\n</sitemapindex>\n'
----------------------------------------------------------------------
Ran 646 tests in 400.243s
FAILED (failures=2, skipped=2)
Destroying test database for alias 'default'...
root@10:/home/ubuntu/src/satchmo/scripts/store#