Skip to content

Commit

Permalink
feat(api): removes ceramic network test
Browse files Browse the repository at this point in the history
  • Loading branch information
aminah-io committed Sep 12, 2023
1 parent d40c5ec commit 57449a8
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions api/reader/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@

from .passport_reader import get_passport

# Location of a Ceramic node that we can read state from
CERAMIC_URL = "https://ceramic.passport-iam.gitcoin.co"


sample_stamps = [
{
"type": ["VerifiableCredential"],
Expand Down Expand Up @@ -89,42 +85,6 @@


class TestGetStamps:
@pytest.mark.django_db
def test_only_ceramic_stamps(self):
"""Make sure cached ceramic stamps are returned when no cached stamps exist in the DB"""

address = "0x123test"

with patch(
"reader.passport_reader.get_stamps",
return_value={
"stamps": [
{
"provider": s["credentialSubject"]["provider"],
"credential": s,
}
for s in sample_stamps
]
},
):
passport = get_passport(
address,
stream_ids=[
"1",
"2",
"3",
],
)

stamps = passport["stamps"]

assert len(sample_stamps) == len(stamps)
for (index, sample_stamp) in enumerate(sample_stamps):
assert (
stamps[index]["credential"]["issuanceDate"]
== sample_stamp["issuanceDate"]
)

@pytest.mark.django_db
def test_only_cached_stamps(self):
"""Make sure cached stamps are returned when they exist in the DB and the ceramic stamps are ignored"""
Expand Down

0 comments on commit 57449a8

Please sign in to comment.