Skip to content

Commit

Permalink
Merge pull request #1887 from nationalarchives/bump-api-31
Browse files Browse the repository at this point in the history
Bump API client to 31.0.0
  • Loading branch information
jacksonj04 authored Feb 4, 2025
2 parents 3feb03b + 23760ec commit 5c3a87c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 17 deletions.
1 change: 0 additions & 1 deletion judgments/tests/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class DocumentVersionFactory(DocumentFactory):
def build(
cls,
uri=default_document_uri,
html="<p>This is a Document Version.</p>",
api_client=None,
**kwargs: Any,
) -> DocumentClass:
Expand Down
12 changes: 4 additions & 8 deletions judgments/tests/test_document_edit.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from unittest.mock import Mock, patch

import pytest
from caselawclient.factories import JudgmentFactory, PressSummaryFactory
from caselawclient.identifier_resolution import IdentifierResolution, IdentifierResolutions
from caselawclient.factories import IdentifierResolutionFactory, JudgmentFactory, PressSummaryFactory
from caselawclient.identifier_resolution import IdentifierResolutions
from caselawclient.models.documents import DocumentURIString
from caselawclient.models.identifiers.neutral_citation import NeutralCitationNumber
from caselawclient.xquery_type_dicts import MarkLogicDocumentURIString
Expand Down Expand Up @@ -234,17 +234,13 @@ def test_update_ncn_of_document_rejects_plausible_but_invalid_ncn(
def test_verify_stub_not_used_with_values(api_client):
api_client.resolve_from_identifier.return_value = IdentifierResolutions(
[
IdentifierResolution(
identifier_uuid="uuid",
IdentifierResolutionFactory.build(
document_uri=MarkLogicDocumentURIString("uksc/2024/999"),
identifier_slug=DocumentURIString("slug"),
document_published=True,
),
IdentifierResolution(
identifier_uuid="uuid",
IdentifierResolutionFactory.build(
document_uri=MarkLogicDocumentURIString("uksc/1701/999"),
identifier_slug=DocumentURIString("slug"),
document_published=True,
),
],
)
Expand Down
5 changes: 0 additions & 5 deletions judgments/tests/test_factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,3 @@ def test_versions(self):
judgment = JudgmentFactory.build()

assert judgment.versions == []

def test_html(self):
judgment = JudgmentFactory.build(html="<h1>Testing HTML</h1>")

assert judgment.content_as_html(DocumentURIString("example/2024/1")) == "<h1>Testing HTML</h1>"
3 changes: 1 addition & 2 deletions judgments/tests/test_judgments.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def test_judgment_html_view(self, document_type, document_exists, mock_judgment)
uri=DocumentURIString("hvtest/4321/123"),
body=DocumentBodyFactory.build(
name="Test v Tested",
xml_string="<akomantoso>This is our test judgment.</akomantoso>",
),
)
judgment.body.document_date_as_date = date(1999, 10, 31)
Expand All @@ -38,7 +37,7 @@ def test_judgment_html_view(self, document_type, document_exists, mock_judgment)

decoded_response = response.content.decode("utf-8")
assert "Test v Tested" in decoded_response
assert "This is our test judgment." in decoded_response
assert "This is a document" in decoded_response
assert "31 Oct 1999" in decoded_response
assert response.status_code == 200

Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ xmltodict~=0.14.1
requests-toolbelt~=1.0.0
lxml~=5.3.0
wsgi-basic-auth~=1.1.0
ds-caselaw-marklogic-api-client~=29.2.0
ds-caselaw-marklogic-api-client~=31.0.0
ds-caselaw-utils~=2.2.0
rollbar
django-stronghold==0.4.0
Expand Down

0 comments on commit 5c3a87c

Please sign in to comment.