Skip to content
Open
Show file tree
Hide file tree
Changes from 19 commits
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
5 changes: 2 additions & 3 deletions catalyst-gateway/bin/src/db/event/signed_docs/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,8 @@ async fn filter_by_type(
}
}

/// Pre-seeded documents `f14.sql`, `f15.sql`, `old_format_signed_doc.sql` and
/// `test_signed_documents.sql`
const PRE_SEED_DATA: usize = 57;
/// Pre-seeded documents `f14.sql`, `f15.sql`, `old_format_signed_doc.sql`
const PRE_SEED_DATA: usize = 55;

async fn filter_all(docs: &[FullSignedDoc]) {
let filter = DocsQueryFilter::all();
Expand Down
32 changes: 0 additions & 32 deletions catalyst-gateway/event-db/seed/test_signed_documents.sql

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
from api.v1 import document as document_v1
from api.v2 import document as document_v2
from utils.rbac_chain import rbac_chain_factory
from utils.signed_doc import (
proposal_doc_factory,
)
from utils.signed_doc import proposal_doc_factory, ProposalParameterType


@pytest.mark.preprod_indexing
def test_document_put_and_get_endpoints(proposal_doc_factory, rbac_chain_factory):
(proposal_doc, role_id) = proposal_doc_factory()
rbac_chain = rbac_chain_factory()
(proposal_doc, role_id) = proposal_doc_factory(ProposalParameterType.CATEGORY)
(cat_id, sk_hex) = rbac_chain.cat_id_for_role(role_id)
proposal_doc_id = proposal_doc.metadata["id"]

Expand Down Expand Up @@ -82,7 +80,7 @@ def test_document_index_endpoint(
proposal_doc_factory,
rbac_chain_factory,
):
(doc, role_id) = proposal_doc_factory()
(doc, role_id) = proposal_doc_factory(ProposalParameterType.CATEGORY)

rbac_chain = rbac_chain_factory()
(cat_id, sk_hex) = rbac_chain.cat_id_for_role(role_id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def deprecated_proposal(rbac_chain):
"ver": "0194d490-30bf-7473-81c8-a0eaef369619",
},
}
with open("./test_data/signed_docs/proposal.json", "r") as json_file:
with open("./test_data/signed_docs/proposal.deprecated.json", "r") as json_file:
content = json.load(json_file)

doc = SignedDocumentV1(proposal_metadata_json, content)
Expand Down
828 changes: 600 additions & 228 deletions catalyst-gateway/tests/api_tests/poetry.lock

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions catalyst-gateway/tests/api_tests/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# cspell: words bitcoinlib addopts beautifulsoup cloudscraper certifi
# cspell: words bitcoinlib addopts certifi

[tool.poetry]
name = "api_tests"
Expand All @@ -19,12 +19,11 @@ asyncpg = "^0.30.0"
requests = "^2.32.3"
python-bitcoinlib = "^0.12.2"
pycardano = "^0.17.0"
beautifulsoup4 = "^4.13.4"
cloudscraper = "^1.2.71"
certifi = "^2025.1.31"
cbor2 = "^5.6.5"
uuid = "^1.30"
httpx = "^0.28.1"
jsf = "^0.11.2"

[tool.poetry.group.dev.dependencies]
pytest = "^8.0.0"
Expand Down
Loading
Loading