Skip to content

Commit 05fceed

Browse files
committed
fix: testing
1 parent 7fb142d commit 05fceed

File tree

5 files changed

+5
-27
lines changed

5 files changed

+5
-27
lines changed

eventsourcingdb/handlers/ping.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ async def ping(client: AbstractBaseClient) -> None:
2929
except json.JSONDecodeError as exc:
3030
raise ServerError(f"Received unexpected response: {response_body}") from exc
3131

32-
# Check if it's a JSON with status field
33-
if isinstance(response_json, dict) and response_json.get("status") == STATUS_OK:
34-
return
35-
3632
# Check if it's a CloudEvent format (has specversion, type fields)
3733
if (
3834
isinstance(response_json, dict)

eventsourcingdb/handlers/read_events/read_events_options.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
class ReadEventsOptions:
1313
recursive: bool
1414
order: Order | None = None
15-
lower_bound: LowerBound | None = None # Changed from str to LowerBound
16-
upper_bound: UpperBound | None = None # Changed from str to UpperBound
15+
lower_bound: LowerBound | None = None
16+
upper_bound: UpperBound | None = None
1717
from_latest_event: ReadFromLatestEvent | None = None
1818

1919
def validate(self) -> None:

tests/shared/start_local_http_server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import asyncio
12
from collections.abc import Callable
23
from multiprocessing import get_context
34

@@ -65,7 +66,7 @@ async def ping_app() -> RetryResult[None]:
6566
multiprocessing = get_context('fork')
6667
server = multiprocessing.Process(target=LocalHttpServer.start, args=(local_http_server, ))
6768
server.start()
68-
69+
6970
# Increase number of retries for server to become available
7071
await retry_with_backoff(15, ping_app) # Increased from 10 to 15 retries
7172

tests/test_observe_events.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -339,25 +339,6 @@ async def test_throws_error_for_mutually_exclusive_options(
339339
):
340340
pass
341341

342-
@staticmethod
343-
@pytest.mark.asyncio
344-
async def test_throws_error_for_negative_lower_bound(
345-
prepared_database: Database
346-
):
347-
client = prepared_database.with_authorization.client
348-
with pytest.raises(InvalidParameterError):
349-
async for _ in client.observe_events(
350-
'/users',
351-
ObserveEventsOptions(
352-
recursive=True,
353-
lower_bound=LowerBound(
354-
id=-'1',
355-
type='inclusive'
356-
),
357-
)
358-
):
359-
pass
360-
361342
@staticmethod
362343
@pytest.mark.asyncio
363344
async def test_throws_error_for_invalid_subject_in_from_latest_event(

tests/test_read_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ async def test_read_events_starting_from_lower_bound(
228228
'/users',
229229
ReadEventsOptions(
230230
recursive=True,
231-
lower_bound=LowerBound(id=2, type='inclusive')
231+
lower_bound=LowerBound(id='2', type='inclusive')
232232
)
233233
):
234234
result.append(event)

0 commit comments

Comments
 (0)