Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tech-debt] Clean up global fixtures #695

Merged
merged 3 commits into from
Dec 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Clean up global fixtures
javidq committed Dec 2, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 605c8127af4b505a2e3bcf0c2cc7033052c87cb8
3 changes: 1 addition & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -3,10 +3,9 @@
import pytest
import requests

from tests import constants
from up42 import host

from .fixtures import fixtures_globals as constants


@pytest.fixture(autouse=True)
def restore_default_domain():
58 changes: 58 additions & 0 deletions tests/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
TOKEN = "token_123"
API_HOST = "https://api.up42.com"
WORKSPACE_ID = "workspace_id_123"
USER_EMAIL = "[email protected]"
PASSWORD = "<PASSWORD>"
DATA_PRODUCT_ID = "47dadb27-9532-4552-93a5-48f70a83eaef"
ORDER_ID = "da2310a2-c7fb-42ed-bead-fb49ad862c67"
URL_STAC_CATALOG = "https://api.up42.com/v2/assets/stac/"
URL_STAC_SEARCH = "https://api.up42.com/v2/assets/stac/search"

STAC_CATALOG_RESPONSE = {
"conformsTo": [
"https://api.stacspec.org/v1.0.0-rc.1/item-search#sort",
"https://api.stacspec.org/v1.0.0-rc.1/collections",
"https://api.stacspec.org/v1.0.0-rc.1/item-search#filter",
"http://www.opengis.net/spec/ogcapi-features-4/1.0/conf/simpletx",
"https://api.stacspec.org/v1.0.0-rc.1/item-search#filter:basic-cql",
"https://api.stacspec.org/v1.0.0-rc.1/item-search",
"https://api.stacspec.org/v1.0.0-rc.1/ogcapi-features/extensions/transaction",
"https://api.stacspec.org/v1.0.0-rc.1/item-search#filter:cql-text",
"http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/features-filter",
"http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/filter",
"https://api.stacspec.org/v1.0.0-rc.1/core",
"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core",
"https://api.stacspec.org/v1.0.0-rc.1/ogcapi-features",
"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson",
"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30",
],
"links": [
{
"href": URL_STAC_CATALOG,
"rel": "self",
"type": "application/json",
},
{
"href": URL_STAC_CATALOG,
"rel": "root",
"type": "application/json",
},
{
"href": "https://api.up42.com/v2/assets/stac/collections",
"rel": "data",
"type": "application/json",
},
{
"href": URL_STAC_SEARCH,
"rel": "search",
"type": "application/json",
"method": "POST",
},
],
"stac_extensions": [],
"title": "UP42 Storage",
"description": "UP42 Storage STAC API",
"stac_version": "1.0.0",
"id": "up42-storage",
"type": "Catalog",
}
Empty file removed tests/fixtures/__init__.py
Empty file.
141 changes: 0 additions & 141 deletions tests/fixtures/fixtures_globals.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/http/test_client.py
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@

import pytest

from tests.fixtures import fixtures_globals as constants
from tests import constants
from up42.http import client, config

SETTINGS = {"some": "settings"}
Loading