Skip to content

Commit c62c09b

Browse files
Try to run all tests
Signed-off-by: YariKartoshe4ka <yaroslav.kikel.06@inbox.ru>
1 parent f378eb7 commit c62c09b

File tree

2 files changed

+11
-18
lines changed

2 files changed

+11
-18
lines changed

.github/workflows/check.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ jobs:
3939
- name: Run test suite
4040
run: tox --skip-pkg-install
4141
env:
42-
CI_RUN: 1
4342
VK_ACCESS_TOKEN: ${{ secrets.VK_ACCESS_TOKEN }}
4443
VK_USER_LOGIN: ${{ secrets.VK_USER_LOGIN }}
4544
VK_USER_PASSWORD: ${{ secrets.VK_USER_PASSWORD }}

tests/test_session.py

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import logging
22
from io import StringIO
3-
from os import getenv, urandom
3+
from os import urandom
44

55
import pytest
66

@@ -16,10 +16,7 @@ def api(access_token, v, lang):
1616

1717
@pytest.fixture
1818
def user_api(user_login, user_password, v, lang):
19-
if not getenv('CI_RUN'):
20-
return UserAPI(user_login, user_password, v=v, lang=lang)
21-
22-
pytest.skip('CI run') # pragma: no cover
19+
return UserAPI(user_login, user_password, v=v, lang=lang)
2320

2421

2522
@pytest.fixture
@@ -29,17 +26,14 @@ def direct_user_api(user_login, user_password, v, lang):
2926

3027
@pytest.fixture
3128
def community_api(user_login, user_password, group_ids, v, lang):
32-
if not getenv('CI_RUN'):
33-
return CommunityAPI(
34-
user_login,
35-
user_password,
36-
scope='messages',
37-
group_ids=list(map(int, group_ids.split(','))),
38-
v=v,
39-
lang=lang
40-
)
41-
42-
pytest.skip('CI run') # pragma: no cover
29+
return CommunityAPI(
30+
user_login,
31+
user_password,
32+
scope='messages',
33+
group_ids=list(map(int, group_ids.split(','))),
34+
v=v,
35+
lang=lang
36+
)
4337

4438

4539
def test_api_durov(api):
@@ -77,7 +71,7 @@ def test_direct_user_api_durov(direct_user_api):
7771
assert users[0]['last_name'] == 'Durov'
7872

7973

80-
def test_direct_user_api_errors():
74+
def test_direct_user_api_auth_errors():
8175
class EnDirectUserAPI(DirectUserAPI):
8276
def _get_auth_params(self):
8377
return {**super()._get_auth_params(), 'lang': 'en'}

0 commit comments

Comments
 (0)