Skip to content

Commit ee06f6d

Browse files
committed
Removed test case from test_access_control
1 parent 8411dcf commit ee06f6d

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

tiled/_tests/test_access_control.py

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import asyncio
2-
import time
31
import json
42
import sqlite3
53
from copy import deepcopy
@@ -672,48 +670,6 @@ def test_deletion_access_control(access_control_test_context_factory):
672670
alice_client[top]["data_H"].delete(external_only=False)
673671

674672

675-
async def coro_test(c, keys):
676-
asyncio.sleep(0.5)
677-
child_node = await c.context.http_client.app.state.root_tree[keys[0]].lookup_adapter(
678-
[keys[1]]
679-
)
680-
return child_node
681-
682-
683-
def test_created_and_updated_info(access_control_test_context_factory):
684-
"""
685-
Test that created_by and updated_by fields are correctly set
686-
on node creation and metadata update.
687-
"""
688-
689-
alice_client = access_control_test_context_factory("alice", "alice")
690-
chris_client = access_control_test_context_factory("chris", "chris")
691-
692-
top = "foo"
693-
for data in ["data_M"]:
694-
# Create a new node and check created_by and updated_by
695-
chris_client[top].write_array(
696-
arr,
697-
key=data,
698-
metadata={"description": "initial"},
699-
access_tags=["chris_tag"],
700-
)
701-
coro_obj = coro_test(chris_client, [top, data])
702-
result = asyncio.run(coro_obj)
703-
assert result.node.created_by == "alice"
704-
assert result.node.updated_by == "alice"
705-
assert result.node.time_created.date() == result.node.time_updated.date()
706-
707-
time.sleep(1) # ensure time_updated is different
708-
alice_client[top][data].replace_metadata(
709-
metadata={"description": "updated"}
710-
) # Still need to test this works with another user
711-
coro_obj = coro_test(alice_client, [top, data])
712-
result = asyncio.run(coro_obj)
713-
assert result.node.created_by != result.node.updated_by
714-
assert result.node.time_created != result.node.time_updated
715-
716-
717673
def test_user_owned_node_access_control(access_control_test_context_factory):
718674
"""
719675
Test that user-owned nodes (i.e. nodes created without access tags applied)

0 commit comments

Comments
 (0)