Changeset - 4cdbdb71ceee
[Not reviewed]
0 6 0
Christopher Neugebauer - 8 years ago 2016-04-25 07:37:33
chrisjrn@gmail.com
flake8 fixes
6 files changed with 20 insertions and 16 deletions:
0 comments (0 inline, 0 general)
registrasion/controllers/discount.py
Show inline comments
...
 
@@ -72,5 +72,5 @@ def available_discounts(user, categories, products):
 
        past_uses = commerce.DiscountItem.objects.filter(
 
            cart__user=user,
 
            cart__status=commerce.Cart.STATUS_PAID, # Only past carts count
 
            cart__status=commerce.Cart.STATUS_PAID,  # Only past carts count
 
            discount=real_discount,
 
        )
registrasion/templatetags/registrasion_tags.py
Show inline comments
...
 
@@ -11,4 +11,5 @@ register = template.Library()
 
_ProductAndQuantity = namedtuple("ProductAndQuantity", ["product", "quantity"])
 

	
 

	
 
class ProductAndQuantity(_ProductAndQuantity):
 
    ''' Class that holds a product and a quantity.
registrasion/tests/test_cart.py
Show inline comments
...
 
@@ -27,10 +27,14 @@ class RegistrationCartTestCase(SetTimeMixin, TestCase):
 

	
 
    def tearDown(self):
 
        if False:
 
        if True:
 
            # If you're seeing segfaults in tests, enable this.
 
            call_command('flush', verbosity=0, interactive=False,
 
                             reset_sequences=False,
 
                             allow_cascade=False,
 
                             inhibit_post_migrate=False)
 
            call_command(
 
                'flush',
 
                verbosity=0,
 
                interactive=False,
 
                reset_sequences=False,
 
                allow_cascade=False,
 
                inhibit_post_migrate=False
 
            )
 

	
 
        super(RegistrationCartTestCase, self).tearDown()
...
 
@@ -52,9 +56,9 @@ class RegistrationCartTestCase(SetTimeMixin, TestCase):
 

	
 
        attendee1 = people.Attendee.get_instance(cls.USER_1)
 
        profile1 = people.AttendeeProfileBase.objects.create(
 
        people.AttendeeProfileBase.objects.create(
 
            attendee=attendee1,
 
        )
 
        attendee2 = people.Attendee.get_instance(cls.USER_2)
 
        profile2 = people.AttendeeProfileBase.objects.create(
 
        people.AttendeeProfileBase.objects.create(
 
            attendee=attendee2,
 
        )
registrasion/tests/test_invoice.py
Show inline comments
...
 
@@ -485,5 +485,5 @@ class InvoiceTestCase(RegistrationCartTestCase):
 

	
 
        notes = commerce.CreditNote.objects.filter(invoice=invoice.invoice)
 
        notes = sorted(notes, key = lambda note: note.value)
 
        notes = sorted(notes, key=lambda note: note.value)
 

	
 
        self.assertEqual(cnval, notes[0].value)
registrasion/views.py
Show inline comments
...
 
@@ -22,5 +22,4 @@ from django.core.exceptions import ObjectDoesNotExist
 
from django.core.exceptions import ValidationError
 
from django.http import Http404
 
from django.shortcuts import get_object_or_404
 
from django.shortcuts import redirect
 
from django.shortcuts import render
...
 
@@ -43,7 +42,7 @@ class GuidedRegistrationSection(_GuidedRegistrationSection):
 

	
 
    Attributes:
 
        title (str): The title of the section.
 
       title (str): The title of the section.
 

	
 
        discounts ([registrasion.contollers.discount.DiscountAndQuantity, ...]):
 
       discounts ([registrasion.contollers.discount.DiscountAndQuantity, ...]):
 
            A list of discount objects that are available in the section. You
 
            can display ``.clause`` to show what the discount applies to, and
...
 
@@ -51,7 +50,7 @@ class GuidedRegistrationSection(_GuidedRegistrationSection):
 
            applied.
 

	
 
        description (str): A description of the section.
 
       description (str): A description of the section.
 

	
 
        form (forms.Form): A form to display.
 
       form (forms.Form): A form to display.
 
    '''
 
    pass
...
 
@@ -570,5 +569,4 @@ def invoice_access(request, access_code):
 
    ).order_by("-issue_time")
 

	
 

	
 
    if not invoices:
 
        raise Http404()
...
 
@@ -636,4 +634,5 @@ def _staff_only(user):
 
    return user.is_staff
 

	
 

	
 
@user_passes_test(_staff_only)
 
def manual_payment(request, invoice_id):
setup.cfg
Show inline comments
 
[flake8]
 
exclude = registrasion/migrations/*, build/*
 
exclude = registrasion/migrations/*, build/*, docs/*
0 comments (0 inline, 0 general)