Ejemplo n.º 1
0
class TestAppViewSet(TestCase):
    def setUp(self):
        self.request = RequestFactory().get('/')
        self.viewset = AppViewSet()
        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)
Ejemplo n.º 2
0
class TestAppViewSet(TestCase):

    def setUp(self):
        self.request = RequestFactory().get('/')
        self.viewset = AppViewSet()
        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)
Ejemplo n.º 3
0
 def setUp(self):
     self.request = RequestFactory().get('/')
     self.viewset = AppViewSet()
     self.viewset.action_map = {}
     self.viewset.form = Form
Ejemplo n.º 4
0
 def setUp(self):
     self.request = RequestFactory().get('/')
     self.viewset = AppViewSet()
     self.viewset.action_map = {}
     self.viewset.form = Form