#134: Credit card errors

I also included a couple of miscellaneous fixes in this pull request which I happened to be working on at the same time.
Ok yea makes sense
On Jul 24, 2014 9:17 AM, "Eli Courtwright" <notifications@github.com> wrote:

> In uber/decorators.py:
>
> > @@ -3,14 +3,14 @@
> >  def check_if_can_reg(func):
> >      @wraps(func)
> >      def with_check(*args,**kwargs):
> > -        if state.BADGES_SOLD >= MAX_BADGE_SALES:
> > -            return render('static_views/prereg_soldout.html')
> > -        elif state.BEFORE_PREREG_OPEN:
> > -            return render('static_views/prereg_not_yet_open.html')
> > -        elif state.AFTER_PREREG_TAKEDOWN:
> > -            return render('static_views/prereg_closed.html')
> > -        else:
> > -            return func(*args,**kwargs)
> > +        if not DEV_BOX:
>
> A better approach IMO would be writing unit tests for this function. The
> problem with having it work like this all the time is that in order to
> actually use the prereg system, we have to fiddle with the settings about
> when prereg opens. Which we can certainly do, but having a new person
> bringing up a dev instance need to edit their config file before they can
> test the most basic functionality is more trouble than it's worth, compared
> to writing a unit tests, where we can make assertions about every branch.
>
> Of course, there aren't actually unit tests for ANY of the prereg stuff
> yet :/
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/magfest/ubersystem/pull/356/files#r15345179>.
>