We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc6868b commit b2b86a0Copy full SHA for b2b86a0
1 file changed
tests/unit/test_api.py
@@ -526,6 +526,19 @@ def test_create_flag(self):
526
assert result == response_data
527
assert mock.last_request.json() == flag_data
528
529
+ def test_get_flags_by_ticket_batch(self):
530
+ api = openfoodfacts.API(user_agent=TEST_USER_AGENT)
531
+ ticket_ids = [1, 2, 3]
532
+ response_data = {"flags": []}
533
+ with requests_mock.mock() as mock:
534
+ mock.post(
535
+ "https://nutripatrol.openfoodfacts.org/api/v1/flags/batch",
536
+ text=json.dumps(response_data),
537
+ )
538
+ result = api.nutripatrol.get_flags_by_ticket_batch(ticket_ids)
539
+ assert result == response_data
540
+ assert mock.last_request.json() == {"ticket_ids": ticket_ids}
541
+
542
def test_get_ticket(self):
543
api = openfoodfacts.API(user_agent=TEST_USER_AGENT)
544
ticket_id = 456
0 commit comments