Skip to content

Commit

Permalink
Constants
Browse files Browse the repository at this point in the history
  • Loading branch information
RickiJay-WMDE committed Oct 25, 2024
1 parent e24b248 commit 643ffc5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Test Create Software Version Observation"""
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""Constants"""

DATA_DIRECTORY = (
"tests/test_create_observation/test_create_software_version_observation/data"
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
import pytest
from fetch_data import create_software_version_observation
from tests.mock_info import MockBackgroundClassList, MockInfo
from tests.utils import MockResponse


DATA_DIRECTORY = (
"tests/test_create_observation/test_create_software_version_observation/data"
from tests.test_create_observation.test_create_software_version_observation.test_constants import (
DATA_DIRECTORY,
)
from tests.utils import MockResponse


@pytest.mark.asyncio
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
from fetch_data.soup_data.software.get_update_software_data import (
get_update_extension_query,
)
from tests.utils import MockResponse


DATA_DIRECTORY = (
"tests/test_create_observation/test_create_software_version_observation/data"
from tests.test_create_observation.test_create_software_version_observation.test_constants import (
DATA_DIRECTORY,
)
from tests.utils import MockResponse


@pytest.mark.asyncio
Expand All @@ -22,7 +20,7 @@
async def test_update_software_data(mocker):
"""Test Update Software Data"""

# pylint: disable=unused-argument
# pylint: disable=unused-argument,too-many-return-statements
def mockery(*args, **kwargs):
print(args)
query = args[0]
Expand Down Expand Up @@ -125,6 +123,7 @@ def test_get_update_extension_query():

query = get_update_extension_query()
assert str(query) == (
# pylint: disable=line-too-long
"""SELECT wikibase_software.id, wikibase_software.software_type, wikibase_software.software_name, wikibase_software.url, wikibase_software.fetched, wikibase_software.description, wikibase_software.latest_version, wikibase_software.quarterly_download_count, wikibase_software.public_wiki_count, wikibase_software.mw_bundled, wikibase_software.archived
FROM wikibase_software
WHERE (wikibase_software.fetched IS NULL OR wikibase_software.fetched < :fetched_1) AND wikibase_software.software_type = :software_type_1 AND (wikibase_software.archived = false OR wikibase_software.archived IS NULL)
Expand Down

0 comments on commit 643ffc5

Please sign in to comment.