Skip to content

Commit

Permalink
remove duplicate code and replace with conftest fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
dancost committed Jul 23, 2024
1 parent e612705 commit 40cfc1a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/endpoint_tests/get_orders_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@


@pytest.fixture(scope='function')
def setup_new_order(forex_api_session):
# load the test sample
json_file_path = 'test_data/new_order_sample.json'
with open(json_file_path, 'r') as file:
new_order = json.load(file)

def setup_new_order(forex_api_session, load_sample_order):
new_order = load_sample_order
# modify test sample
new_order["stocks"] = "EURUSD"
new_order["quantity"] = 10
Expand Down

0 comments on commit 40cfc1a

Please sign in to comment.