class TestPaymentAppViewSet(TestCase):
    def setUp(self):
        self.request = RequestFactory().get('/')
        self.viewset = PaymentAppViewSet()
        self.viewset.action_map = {}
        self.viewset.form = Form

    def test_ok(self):
        self.viewset.initialize_request(self.request, pk='valid')
        ok_(self.viewset.app)

    def test_not_ok(self):
        self.viewset.initialize_request(self.request, pk='invalid')
        eq_(self.viewset.app, None)
Beispiel #2
0
class TestPaymentAppViewSet(TestCase):

    def setUp(self):
        self.request = RequestFactory().get('/')
        self.viewset = PaymentAppViewSet()
        self.viewset.action_map = {}
        self.viewset.form = Form

    def test_ok(self):
        self.viewset.initialize_request(self.request, pk='valid')
        ok_(self.viewset.app)

    def test_not_ok(self):
        self.viewset.initialize_request(self.request, pk='invalid')
        eq_(self.viewset.app, None)
Beispiel #3
0
 def setUp(self):
     self.request = RequestFactory().get('/')
     self.viewset = PaymentAppViewSet()
     self.viewset.action_map = {}
     self.viewset.form = Form