This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ValidateOnPersistMixin(models.Model): | |
class Meta: | |
abstract = True | |
def save(self, force_insert=False, force_update=False, using=None): | |
self.full_clean() | |
super(ValidateOnPersistMixin, self).save(force_insert, force_update, using) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import simplejson | |
from datetime import datetime | |
from isodate import parse_duration | |
from django.core.cache import cache | |
from django.conf import settings | |
from yola.services import ProductService |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from unittest import TestCase | |
from checkoutservice.tests.base import FREE_USER_SUB | |
from checkoutservice.tests.base import ACTIVE_SILVER_P1Y_SUB | |
from checkoutservice.tests.base import ACTIVE_BRONZE_P1Y_SUB | |
from checkoutservice.tests.base import EXPIRED_BRONZE_P1Y_SUB | |
from checkoutservice.tests.base import EXPIRED_SILVER_P1Y_SUB | |
from checkoutservice.subscription.process import _determine_current_bundle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytz | |
from flexmock import flexmock | |
from decimal import Decimal | |
from isodate import parse_duration | |
from datetime import datetime | |
from checkoutservice.tests.base import BaseTestCase | |
from yola.django.user import User |