Skip to content

Commit

Permalink
fix dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
MorvanZhou committed Nov 3, 2023
1 parent 11a1d44 commit bc3ce7b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
import socket
import time
import unittest
import urllib.request
from pathlib import Path

import requests

from rethink import run


Expand Down Expand Up @@ -46,10 +45,10 @@ def test_run(self):
"/r/import",
"/n/123",
]:
resp = requests.get(f"http://127.0.0.1:{port}{url}")
self.assertEqual(200, resp.status_code, msg=f"failed to get {url}")
resp = urllib.request.urlopen(f"http://127.0.0.1:{port}{url}")
self.assertEqual(200, resp.status, msg=f"failed to get {url}")
self.assertEqual("text/html; charset=utf-8", resp.headers["content-type"])
self.assertIn("Rethink", resp.text)
self.assertIn("Rethink", resp.read().decode())

p.kill()
self.assertTrue(self.path.exists())
Expand Down

0 comments on commit bc3ce7b

Please sign in to comment.