我正在通过“遵守测试山羊书”学习 TDD,但我正在尝试使用 Django 3。
如果有人知道的话,我在第6章。
我的代码是:
class VisitorTest(LiveServerTestCase):
def setUp(self):
self.browser = webdriver.Chrome()
self.browser.implicitly_wait(2)
def tearDown(self):
self.browser.quit()
def test_starting(self):
print(self.live_server_url)
self.browser.get(self.live_server_url)
Run Code Online (Sandbox Code Playgroud)
在控制台我得到
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
DevTools listening on ws://127.0.0.1:52187/devtools/browser/e9a03a04-819e-40a3-a0e4-bd4133d8f6cb
http://localhost:52180
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 52204)
----------------------------------------
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 52202)
Exception happened during processing of request from ('127.0.0.1', 52203)
Traceback (most recent call last):
Traceback (most recent call last): …Run Code Online (Sandbox Code Playgroud) 我向集合中添加了一些数据。当我检索它时,它按生成的 id 排序。是否可以让 firebase 按时间顺序对其进行排序,或者是否需要添加一个带有日期的字段并在它在颤动中检索后对其进行排序?