From e10b8ea2a1aaa581e7f82d33782987568241bbc1 Mon Sep 17 00:00:00 2001 From: dlpzx Date: Thu, 5 Dec 2024 13:52:30 +0100 Subject: [PATCH] Fix count votes integ test --- .../integration_tests/modules/vote/test_vote.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tests_new/integration_tests/modules/vote/test_vote.py b/tests_new/integration_tests/modules/vote/test_vote.py index 49c657bbf..3f6bb0482 100644 --- a/tests_new/integration_tests/modules/vote/test_vote.py +++ b/tests_new/integration_tests/modules/vote/test_vote.py @@ -39,13 +39,5 @@ def test_count_upvote_invalid(client1, vote1, session_s3_dataset1): ) -def test_count_votes(client2, vote1, session_s3_dataset1): - count = count_upvotes(client2, session_s3_dataset1.datasetUri, S3_DATASET_TARGET_TYPE) - - # Assert incremeent by 1 - upvote(client2, session_s3_dataset1.datasetUri, S3_DATASET_TARGET_TYPE, True) - assert_that(count_upvotes(client2, session_s3_dataset1.datasetUri, S3_DATASET_TARGET_TYPE)).is_equal_to(count + 1) - - # Assert decrement by 1 - upvote(client2, session_s3_dataset1.datasetUri, S3_DATASET_TARGET_TYPE, False) - assert_that(count_upvotes(client2, session_s3_dataset1.datasetUri, S3_DATASET_TARGET_TYPE)).is_equal_to(count) +def test_count_votes(client1, vote1, session_s3_dataset1): + assert_that(count_upvotes(client1, session_s3_dataset1.datasetUri, S3_DATASET_TARGET_TYPE)).is_equal_to(1)