Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
remove old code (bug 839180)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy McKay committed Mar 7, 2013
1 parent 3ed2398 commit 2d1a3e4
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 540 deletions.
334 changes: 0 additions & 334 deletions mkt/purchase/tests/test_views.py

This file was deleted.

2 changes: 1 addition & 1 deletion mkt/purchase/tests/test_webpay.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from amo.urlresolvers import reverse
from stats.models import Contribution

from .test_views import PurchaseTest
from utils import PurchaseTest


@mock.patch.object(settings, 'SOLITUDE_HOSTS', ['host'])
Expand Down
5 changes: 3 additions & 2 deletions mkt/purchase/tests/test_webpay_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
from requests.exceptions import Timeout

import amo
from stats.models import Contribution

from mkt.inapp_pay.models import InappConfig
from mkt.purchase import webpay_tasks as tasks
from stats.models import Contribution

from .test_views import PurchaseTest
from utils import PurchaseTest


class TestNotify(PurchaseTest):
Expand Down
40 changes: 40 additions & 0 deletions mkt/purchase/tests/utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
from decimal import Decimal

import amo
from addons.models import Addon
from market.models import AddonPremium, Price, PriceCurrency
from users.models import UserProfile

from mkt.developers.models import (AddonPaymentAccount, PaymentAccount,
SolitudeSeller)
from mkt.site.fixtures import fixture


class PurchaseTest(amo.tests.TestCase):
fixtures = fixture('prices', 'user_admin', 'user_999', 'webapp_337141')

def setUp(self):
self.create_switch(name='marketplace')
self.addon = Addon.objects.get(pk=337141)
self.addon.update(premium_type=amo.ADDON_PREMIUM)
self.user = UserProfile.objects.get(email='regular@mozilla.com')
self.price = Price.objects.get(pk=1)
AddonPremium.objects.create(addon=self.addon, price=self.price,
currencies=['BRL'])
assert self.client.login(username='regular@mozilla.com',
password='password')
self.brl = PriceCurrency.objects.create(currency='BRL',
price=Decimal('0.5'),
tier_id=1)

def setup_package(self):
self.seller = SolitudeSeller.objects.create(
resource_uri='/path/to/sel', uuid='seller-id',
user=self.user)
self.account = PaymentAccount.objects.create(
user=self.user, uri='asdf', name='test', inactive=False,
solitude_seller=self.seller, bango_package_id=123)
AddonPaymentAccount.objects.create(
addon=self.addon, provider='bango', account_uri='foo',
payment_account=self.account, product_uri='bpruri',
set_price=12345)
Loading

0 comments on commit 2d1a3e4

Please sign in to comment.