@@ -63,6 +63,27 @@ def empty_defn() -> TableConfig:
6363 return TableConfig (name = "empty" , description = "empty" , datasets = [], rows = [], variables = [], columns = [])
6464
6565
66+ def test_deprecation_of_positional_arguments (session ):
67+ with pytest .deprecated_call ():
68+ TableConfigCollection (
69+ UUID ('6b608f78-e341-422c-8076-35adc8828545' ),
70+ session ,
71+ team_id = UUID ('6b608f78-e341-422c-8076-35adc8828545' ),
72+ )
73+
74+ with pytest .raises (TypeError ):
75+ TableConfigCollection (
76+ team_id = UUID ('6b608f78-e341-422c-8076-35adc8828545' ),
77+ session = session
78+ )
79+
80+ with pytest .raises (TypeError ):
81+ TableConfigCollection (
82+ team_id = UUID ('6b608f78-e341-422c-8076-35adc8828545' ),
83+ project_id = UUID ('6b608f78-e341-422c-8076-35adc8828545' )
84+ )
85+
86+
6687def test_get_table_config (collection , session ):
6788 """Get table config, with or without version"""
6889
@@ -221,7 +242,7 @@ def test_preview(collection, session):
221242 assert 1 == session .num_calls
222243 expect_call = FakeCall (
223244 method = "POST" ,
224- path = f"projects /{ collection .project_id } /ara-definitions/preview" ,
245+ path = f"teams /{ collection .team_id } /ara-definitions/preview" ,
225246 json = {"definition" : empty_defn ().dump (), "rows" : []}
226247 )
227248 assert session .last_call == expect_call
@@ -257,7 +278,7 @@ def test_default_for_material(collection: TableConfigCollection, session):
257278 assert 1 == session .num_calls
258279 assert session .last_call == FakeCall (
259280 method = "GET" ,
260- path = f"projects /{ collection .project_id } /table-configs/default" ,
281+ path = f"teams /{ collection .team_id } /table-configs/default" ,
261282 params = {
262283 'id' : 'my_id' ,
263284 'scope' : CITRINE_SCOPE ,
@@ -279,7 +300,7 @@ def test_default_for_material(collection: TableConfigCollection, session):
279300 assert 1 == session .num_calls
280301 assert session .last_call == FakeCall (
281302 method = "GET" ,
282- path = f"projects /{ collection .project_id } /table-configs/default" ,
303+ path = f"teams /{ collection .team_id } /table-configs/default" ,
283304 params = {
284305 'id' : 'id' ,
285306 'scope' : 'scope' ,
0 commit comments