Skip to content

Commit

Permalink
revert #555 test fix, restore sort_order and sort_by
Browse files Browse the repository at this point in the history
  • Loading branch information
aliel committed Mar 4, 2024
1 parent e663253 commit c89b6ef
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/api/test_list_messages.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import datetime as dt
import itertools
from collections import defaultdict
from typing import Any, Dict, Iterable, List, Optional, Sequence, Union, Tuple
from typing import Any, Dict, Iterable, List, Optional, Sequence, Tuple, Union

import aiohttp
import pytest
from aleph_message.models import Chain, ItemType, MessageType, InstanceContent
from aleph.db.models import MessageDb, PostDb
from aleph.toolkit.timestamp import timestamp_to_datetime
from aleph.types.channel import Channel
from aleph.types.db_session import DbSessionFactory
from aleph_message.models import Chain, InstanceContent, ItemType, MessageType
from aleph_message.models.execution.environment import (
MachineResources,
FunctionEnvironment,
MachineResources,
)
from aleph_message.models.execution.instance import RootfsVolume
from aleph_message.models.execution.volume import ImmutableVolume, ParentVolume

from aleph.db.models import MessageDb, PostDb
from aleph.toolkit.timestamp import timestamp_to_datetime
from aleph.types.channel import Channel
from aleph.types.db_session import DbSessionFactory
from .utils import get_messages_by_keys

MESSAGES_URI = "/api/v0/messages.json"
Expand Down Expand Up @@ -272,8 +272,8 @@ async def fetch_messages_filter_time(
) -> aiohttp.ClientResponse:

params: Dict[str, Union[float, int, str]] = {
"sortBy": sort_by,
"sortOrder": sort_order,
"sort_by": sort_by,
"sort_order": sort_order,
}
if start:
params["startDate"] = start
Expand Down Expand Up @@ -373,7 +373,7 @@ async def fetch_messages_with_pagination(
):
return await api_client.get(
MESSAGES_URI,
params={"page": page, "pagination": pagination, "sortOrder": sort_order},
params={"page": page, "pagination": pagination, "sort_order": sort_order},
)


Expand Down

0 comments on commit c89b6ef

Please sign in to comment.