Skip to content

Commit 29f45d3

Browse files
committed
🎨 style(conftest.py): improve code readability by adding line breaks and reordering imports
🎨 style(types.py): add newline at end of file for better file formatting
1 parent f01d6da commit 29f45d3

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

‎tests/__init__.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-

‎tests/conftest.py‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
"""
66

77
import logging
8-
import pytest
98
import secrets
109

10+
import pytest
11+
1112
from convex_api.api import API
1213
from convex_api.key_pair import KeyPair
1314
from tests.types import KeyPairInfo
@@ -33,22 +34,25 @@
3334

3435
TEST_ACCOUNT_NAME = 'test.convex-api'
3536

37+
3638
@pytest.fixture(scope='module')
3739
def test_key_pair_info() -> KeyPairInfo:
3840
return {
39-
'private_hex' : PRIVATE_TEST_KEY,
41+
'private_hex': PRIVATE_TEST_KEY,
4042
'private_bytes': KeyPair.to_bytes(PRIVATE_TEST_KEY),
4143
'private_text': PRIVATE_TEST_KEY_TEXT,
4244
'private_password': PRIVATE_TEST_KEY_PASSWORD,
4345
'private_mnemonic': PRIVATE_KEY_MNEMONIC,
4446
'public_key': PUBLIC_KEY
4547
}
4648

49+
4750
@pytest.fixture(scope='module')
4851
def test_key_pair(test_key_pair_info: KeyPairInfo):
4952
key_pair = KeyPair.import_from_bytes(test_key_pair_info['private_bytes'])
5053
return key_pair
5154

55+
5256
@pytest.fixture(scope='module')
5357
def test_account(convex: API, test_key_pair: KeyPair):
5458
test_account_name = f'{TEST_ACCOUNT_NAME}.{secrets.token_hex(8)}'
@@ -57,15 +61,18 @@ def test_account(convex: API, test_key_pair: KeyPair):
5761
convex.topup_account(account)
5862
return account
5963

64+
6065
@pytest.fixture(scope='module')
6166
def convex_url():
6267
return CONVEX_URL
6368

69+
6470
@pytest.fixture(scope='module')
6571
def convex(convex_url: str):
6672
api = API(convex_url)
6773
return api
6874

75+
6976
@pytest.fixture(scope='module')
7077
def other_account(convex: API):
7178
key_pair = KeyPair()

‎tests/types.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ class KeyPairInfo(TypedDict):
88
private_text: str
99
private_password: str
1010
private_mnemonic: str
11-
public_key: str
11+
public_key: str

0 commit comments

Comments
 (0)