Skip to content

Commit 1818d11

Browse files
committed
fix tests and lint
1 parent 632d9b3 commit 1818d11

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

Diff for: .github/workflows/build-deck.yml

-6
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,3 @@ jobs:
7272
asset_path: ./leetcode.apkg
7373
asset_name: leetcode.apkg
7474
asset_content_type: application/octet-stream
75-
- name: Publish release
76-
uses: StuYarrow/publish-release@v1
77-
env:
78-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79-
with:
80-
id: ${{ steps.create_release.outputs.id }}

Diff for: test/helpers/test_leetcode.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def dummy_return_question_detail_dict(
7575

7676

7777
@mock.patch("os.environ", mock.MagicMock(return_value={"LEETCODE_SESSION_ID": "test"}))
78+
@mock.patch("os.environ", mock.MagicMock(return_value={"LEETCODE_CSRF_TOKEN": "test"}))
7879
@mock.patch("leetcode.auth", mock.MagicMock())
7980
class TestLeetcode:
8081
# pyre-fixme[56]: Pyre was not able to infer the type of the decorator
@@ -108,9 +109,9 @@ class TestLeetcodeData:
108109
_question_detail_singleton: Optional[
109110
leetcode.models.graphql_question_detail.GraphqlQuestionDetail
110111
] = None
111-
_leetcode_data_singleton: Optional[
112-
leetcode_anki.helpers.leetcode.LeetcodeData
113-
] = None
112+
_leetcode_data_singleton: Optional[leetcode_anki.helpers.leetcode.LeetcodeData] = (
113+
None
114+
)
114115

115116
@property
116117
def _question_details(
@@ -132,7 +133,7 @@ def _leetcode_data(self) -> leetcode_anki.helpers.leetcode.LeetcodeData:
132133

133134
return leetcode_data
134135

135-
def setup(self) -> None:
136+
def setup_method(self) -> None:
136137
self._question_detail_singleton = QUESTION_DETAIL
137138
self._leetcode_data_singleton = leetcode_anki.helpers.leetcode.LeetcodeData(
138139
0, 10000

0 commit comments

Comments
 (0)