Skip to content

Commit

Permalink
fixed pytest run failed
Browse files Browse the repository at this point in the history
  • Loading branch information
visualDust committed Nov 27, 2023
1 parent 4cdcfe9 commit e454fd8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 0 additions & 2 deletions neetbox/daemon/server/_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,10 @@ def return_names_of_status():

@app.route(f"{CLIENT_API_ROOT}/sync/<name>", methods=["POST"])
def sync_status_of(name): # client side function
print("on sync")
_json_data = request.get_json()
if name not in __BRIDGES: # Client not found
__BRIDGES[name] = Bridge(name=name) # Create from sync request
__BRIDGES[name].status = _json_data
print("on done")

return "ok"

Expand Down
20 changes: 10 additions & 10 deletions tests/test_integrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
# os.remove(fname)


def test_resource_loader():
import time
# def test_resource_loader():
# import time

from neetbox.utils.resource import ResourceLoader
# from neetbox.utils.resource import ResourceLoader

print("testing resource loader")
md_loader = ResourceLoader("./", ["md"])
py_loader_async = ResourceLoader("./", async_scan=True, verbose=False)
while not py_loader_async.ready:
print("waiting resource loader")
time.sleep(1)
py_loader_async.get_file_list()
# print("testing resource loader")
# md_loader = ResourceLoader("./", ["md"])
# py_loader_async = ResourceLoader("./", async_scan=True, verbose=False)
# while not py_loader_async.ready:
# print("waiting resource loader")
# time.sleep(1)
# py_loader_async.get_file_list()

0 comments on commit e454fd8

Please sign in to comment.