Skip to content

Commit

Permalink
fix test for check_qid_is_language
Browse files Browse the repository at this point in the history
  • Loading branch information
axif0 committed Jan 8, 2025
1 parent f2ebb1d commit 778498d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/cli/test_total.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
from unittest.mock import MagicMock, call, patch

from scribe_data.cli.total import (
check_qid_is_language,
get_datatype_list,
get_qid_by_input,
get_total_lexemes,
total_wrapper,
)
from scribe_data.utils import check_qid_is_language


class TestTotalLexemes(unittest.TestCase):
Expand Down Expand Up @@ -213,7 +213,7 @@ def test_get_datatype_list_no_data_types(self, mock_dir):


class TestCheckQidIsLanguage(unittest.TestCase):
@patch("scribe_data.cli.total.requests.get")
@patch("scribe_data.utils.requests.get")
def test_check_qid_is_language_valid(self, mock_get):
mock_response = MagicMock()
mock_response.json.return_value = {
Expand All @@ -228,7 +228,7 @@ def test_check_qid_is_language_valid(self, mock_get):
self.assertEqual(result, "English")
mock_print.assert_called_once_with("English (Q1860) is a language.\n")

@patch("scribe_data.cli.total.requests.get")
@patch("scribe_data.utils.requests.get")
def test_check_qid_is_language_invalid(self, mock_get):
mock_response = MagicMock()
mock_response.json.return_value = {
Expand Down

0 comments on commit 778498d

Please sign in to comment.