Skip to content

Commit

Permalink
fixup! Merge branch 'main' into feat-python-flags-api
Browse files Browse the repository at this point in the history
  • Loading branch information
jarviliam committed Mar 8, 2024
1 parent af0fac8 commit 810331b
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 10 deletions.
1 change: 1 addition & 0 deletions flipt-python/flipt/flags/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class FlagType(str, Enum):
variant = "VARIANT_FLAG_TYPE"
boolean = "BOOLEAN_FLAG_TYPE"


class Flag(CamelAliasModel):
created_at: datetime
description: str
Expand Down
1 change: 0 additions & 1 deletion flipt-python/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ def sync_flipt_client(flipt_url, flipt_auth_token):
@pytest.fixture()
def async_flipt_client(flipt_url, flipt_auth_token):
return AsyncFliptClient(url=flipt_url, authentication=ClientTokenAuthentication(flipt_auth_token))

2 changes: 0 additions & 2 deletions flipt-python/tests/flag/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@ def _mock_list_flags_response_error(httpx_mock, flipt_url, request):
status_code=HTTPStatus.INTERNAL_SERVER_ERROR,
json=request.param,
)


4 changes: 1 addition & 3 deletions flipt-python/tests/flag/test_async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

class TestListFlags:
async def test_success(self, async_flipt_client: AsyncFliptClient):
list_response = await async_flipt_client.flag.list_flags(
namespace_key="default"
)
list_response = await async_flipt_client.flag.list_flags(namespace_key="default")
assert len(list_response.flags) == 2

@pytest.mark.usefixtures("_mock_list_flags_response_error")
Expand Down
5 changes: 1 addition & 4 deletions flipt-python/tests/flag/test_sync_client.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@

import pytest

from flipt.exceptions import FliptApiError


class TestListFlags:
def test_success(self, sync_flipt_client):
list_response = sync_flipt_client.flag.list_flags(
namespace_key="default"
)
list_response = sync_flipt_client.flag.list_flags(namespace_key="default")
assert len(list_response.flags) == 2

@pytest.mark.usefixtures("_mock_list_flags_response_error")
Expand Down

0 comments on commit 810331b

Please sign in to comment.