Skip to content

Commit 02a4e38

Browse files
committed
Remove test case parameterization
1 parent 4adccc0 commit 02a4e38

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

tests/test_base_operations.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from syrupy.matchers import path_type
88

99
schema = schemathesis.from_path('../user_account_operations.yaml', base_url=BASE_URL, validate_schema=True)
10-
base_operations_deprecated_schema= schemathesis.from_path('../base_operations_deprecated.yaml', base_url=BASE_URL, validate_schema=True)
1110
base_operations_schema = schemathesis.from_path('../base_operations.yaml', base_url=BASE_URL, validate_schema=True)
1211
file_operations = schemathesis.from_path('../file_operations.yaml', base_url=BASE_URL, validate_schema=True)
1312

@@ -329,7 +328,7 @@ def test_createBase(workspace_id: int, account_token: Secret, snapshot_json: Sna
329328

330329
assert snapshot_json(matcher=matcher) == response.json()
331330

332-
@pytest.mark.parametrize('operation_id', ['createTable', 'createTableDeprecated'])
331+
@pytest.mark.parametrize('operation_id', ['createTable'])
333332
def test_createTable(base: Base, snapshot_json: SnapshotAssertion, operation_id: str):
334333
table_name = f'test_{operation_id}'
335334

@@ -356,7 +355,7 @@ def test_createTable(base: Base, snapshot_json: SnapshotAssertion, operation_id:
356355

357356
assert snapshot_json(matcher=matcher) == response.json()
358357

359-
@pytest.mark.parametrize('operation_id', ['appendRowsDeprecated', 'appendRows'])
358+
@pytest.mark.parametrize('operation_id', ['appendRows'])
360359
def test_appendRows(base: Base, snapshot_json: SnapshotAssertion, operation_id: str):
361360
table_name = f'test_{operation_id}'
362361

@@ -388,7 +387,7 @@ def test_appendRows(base: Base, snapshot_json: SnapshotAssertion, operation_id:
388387

389388
assert snapshot_json(matcher=matcher) == data
390389

391-
@pytest.mark.parametrize('operation_id', ['getRowDeprecated', 'getRow'])
390+
@pytest.mark.parametrize('operation_id', ['getRow'])
392391
def test_getRow(base: Base, snapshot_json, operation_id: str):
393392
table_name = f'test_{operation_id}'
394393

@@ -439,7 +438,7 @@ def test_getRow(base: Base, snapshot_json, operation_id: str):
439438

440439
assert snapshot_json(matcher=matcher) == response.json()
441440

442-
@pytest.mark.parametrize('operation_id', ['listRowsDeprecated', 'listRows'])
441+
@pytest.mark.parametrize('operation_id', ['listRows'])
443442
def test_listRows(base: Base, snapshot_json, operation_id: str):
444443
table_name = f'test_{operation_id}'
445444

@@ -474,7 +473,7 @@ def test_listRows(base: Base, snapshot_json, operation_id: str):
474473
# Verify that response matches snapshot
475474
assert snapshot_json(matcher=matcher) == response.json()
476475

477-
@pytest.mark.parametrize('operation_id', ['listRowsDeprecated', 'listRows'])
476+
@pytest.mark.parametrize('operation_id', ['listRows'])
478477
def test_listRows_links(base: Base, snapshot_json: SnapshotAssertion, operation_id: str):
479478
table_name_1 = f'test_{operation_id}_links-1'
480479
columns_1 = [
@@ -512,7 +511,7 @@ def test_listRows_links(base: Base, snapshot_json: SnapshotAssertion, operation
512511
},
513512
}
514513
headers = {'Authorization': f'Bearer {base.token}'}
515-
case: Case = base_operations_deprecated_schema.get_operation_by_id('insertColumnDeprecated') \
514+
case: Case = base_operations_schema.get_operation_by_id('insertColumn') \
516515
.make_case(path_parameters=path_parameters, body=body, headers=headers)
517516
response = case.call_and_validate()
518517

@@ -527,7 +526,7 @@ def test_listRows_links(base: Base, snapshot_json: SnapshotAssertion, operation
527526
'row_id': table_2_row_id,
528527
'other_rows_ids': table_1_row_ids,
529528
}
530-
case: Case = base_operations_deprecated_schema.get_operation_by_id('createRowLinksDeprecated') \
529+
case: Case = base_operations_schema.get_operation_by_id('createRowLinksDeprecated') \
531530
.make_case(path_parameters=path_parameters, body=body, headers=headers)
532531
response = case.call_and_validate()
533532

@@ -614,7 +613,7 @@ def test_listRows_links(base: Base, snapshot_json: SnapshotAssertion, operation
614613
# Insert link-formula columns to table 2
615614
for column in link_formula_columns:
616615
path_parameters = {'base_uuid': base.uuid}
617-
case: Case = base_operations_deprecated_schema.get_operation_by_id('insertColumnDeprecated') \
616+
case: Case = base_operations_schema.get_operation_by_id('insertColumn') \
618617
.make_case(path_parameters=path_parameters, body=column, headers=headers)
619618
response = case.call_and_validate()
620619
assert response.status_code == 200
@@ -647,7 +646,7 @@ def test_listRows_links(base: Base, snapshot_json: SnapshotAssertion, operation
647646
# Verify that response matches snapshot
648647
assert snapshot_json(matcher=matcher) == response.json()
649648

650-
@pytest.mark.parametrize('operation_id', ['listRowsDeprecated', 'listRows'])
649+
@pytest.mark.parametrize('operation_id', ['listRows'])
651650
def test_listRows_files_images(base: Base, snapshot_json: SnapshotAssertion, operation_id: str):
652651
table_name = f'test_{operation_id}_files_images'
653652
columns = [
@@ -728,7 +727,7 @@ def test_listRows_files_images(base: Base, snapshot_json: SnapshotAssertion, op
728727
)
729728
assert snapshot_json(matcher=matcher) == response.json()
730729

731-
@pytest.mark.parametrize('operation_id', ['querySQLDeprecated', 'querySQL'])
730+
@pytest.mark.parametrize('operation_id', ['querySQL'])
732731
def test_querySQL(base: Base, snapshot_json: SnapshotAssertion, operation_id: str):
733732
table_name = f'test_{operation_id}'
734733

@@ -765,7 +764,7 @@ def create_table(base: Base, table_name: str, columns: list[dict]):
765764
body = {'table_name': table_name, 'columns': columns}
766765
headers = {'Authorization': f'Bearer {base.token}'}
767766

768-
operation = base_operations_deprecated_schema.get_operation_by_id('createTableDeprecated')
767+
operation = base_operations_schema.get_operation_by_id('createTable')
769768
case: Case = operation.make_case(path_parameters=path_parameters, body=body, headers=headers)
770769

771770
response = case.call_and_validate()
@@ -777,7 +776,7 @@ def add_row(base: Base, table_name: str, row: dict) -> str:
777776
body = {'table_name': table_name, 'row': row}
778777
headers = {'Authorization': f'Bearer {base.token}'}
779778

780-
operation = base_operations_deprecated_schema.get_operation_by_id('addRowDeprecated')
779+
operation = base_operations_schema.get_operation_by_id('addRow')
781780
case: Case = operation.make_case(path_parameters=path_parameters, body=body, headers=headers)
782781
response = case.call_and_validate()
783782

0 commit comments

Comments
 (0)