1
0
mirror of https://github.com/quay/quay.git synced 2025-07-28 20:22:05 +03:00

marketplace: add expiration check to org subscription operations (PROJQUAY-6716) (#2696)

add expiration check to org subscription operations
This commit is contained in:
Marcus Kok
2024-03-18 09:15:46 -04:00
committed by GitHub
parent 285ead9050
commit 5db4251114
5 changed files with 112 additions and 16 deletions

View File

@ -5183,6 +5183,14 @@ class TestOrganizationRhSku(ApiTestCase):
plans = check_internal_api_for_subscription(org)
assert len(plans) == 1
def test_expired_attachment(self):
self.login(SUBSCRIPTION_USER)
user = model.user.get_user(SUBSCRIPTION_USER)
org = model.organization.get_organization(SUBSCRIPTION_ORG)
model.organization_skus.bind_subscription_to_org(80808080, org.id, user.id, 1)
json = self.getJsonResponse(OrgPrivateRepositories, params=dict(orgname=SUBSCRIPTION_ORG))
self.assertEqual(json["privateAllowed"], False)
class TestUserSku(ApiTestCase):
def test_get_user_skus(self):