Skip to content

Commit

Permalink
Merge pull request #330 from makerspace/db/subscriptions-test-fix
Browse files Browse the repository at this point in the history
Skip subscription tests when stripe api key not set
  • Loading branch information
BerglundDaniel authored Nov 2, 2023
2 parents 9cd50f0 + 2ca4189 commit 6b0e8d8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/src/shop/test/subscriptions_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import math
from dateutil.relativedelta import relativedelta
from typing import Any, Dict, List, Optional, Set, Tuple, cast
from unittest import skipIf

import pytest
from shop.stripe_util import event_semantic_time
Expand Down Expand Up @@ -69,6 +70,7 @@ class Test(FlaskTestBase):
models = [membership.models, messages.models, shop.models, core.models]
seen_event_ids: Set[str]

@skipIf(not stripe.api_key, "subscriptions tests require stripe api key in .env file")
def setUp(self) -> None:
db_session.query(Member).delete()
db_session.query(Span).delete()
Expand Down

0 comments on commit 6b0e8d8

Please sign in to comment.