def test_post(self):
     with self.assertRaises(NotImplementedError):
         test_backoffice.api_post_view(
             RequestWithViewParams({'view_slug': 'simple'}, self.user))
     r = test_backoffice.api_post_view(
         RequestWithViewParams({'view_slug': 'post'}, self.user))
     self.assertEqual(r['slug'], 'post')
 def test_post_permission(self):
     r = test_backoffice.api_post_view(
         RequestWithViewParams({'view_slug': 'permission'}, self.user2))
     self.assertEqual(
         r.content,
         'You are not allowed to post data to the view "permission".')
 def test_post_permission(self):
     r = test_backoffice.api_post_view(RequestWithViewParams({'view_slug': 'permission'}, self.user2))
     self.assertEqual(r.content, 'You are not allowed to post data to the view "permission".')
 def test_post(self):
     with self.assertRaises(NotImplementedError):
         test_backoffice.api_post_view(RequestWithViewParams({'view_slug': 'simple'}, self.user))
     r = test_backoffice.api_post_view(RequestWithViewParams({'view_slug': 'post'}, self.user))
     self.assertEqual(r['slug'], 'post')