初版:小白超人(从线上实例导出)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
from pathlib import Path
|
||||
import unittest
|
||||
|
||||
|
||||
class RingAllFrontendAuthTests(unittest.TestCase):
|
||||
def test_ring_all_request_sends_session_token(self):
|
||||
source = (
|
||||
Path(__file__).resolve().parents[1] / "static" / "js" / "map.js"
|
||||
).read_text(encoding="utf-8")
|
||||
request_block = source.split('fetch("/api/ring_all"', 1)[1].split(");", 1)[0]
|
||||
|
||||
self.assertIn('"Authorization": `Bearer ${authToken}`', request_block)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user