Пример #1
0
 def test_listener_notification_route_to_scope(self):
     route_scope = qvarn.route_to_scope(
         '/orgs/listeners/<id>/notifications/<id>', 'DELETE')
     self.assertEqual(
         route_scope, u'uapi_orgs_listeners_id_notifications_id_delete')
Пример #2
0
 def test_basic_subitem_route_to_scope(self):
     route_scope = qvarn.route_to_scope(
         '/orgs/<item_id>/document', 'PUT')
     self.assertEqual(route_scope, u'uapi_orgs_id_document_put')
Пример #3
0
 def test_search_route_to_scope(self):
     route_scope = qvarn.route_to_scope(
         '/orgs/search/<search_criteria:path>', 'GET')
     self.assertEqual(route_scope, u'uapi_orgs_search_id_get')
Пример #4
0
 def test_basic_route_to_scope(self):
     route_scope = qvarn.route_to_scope('/orgs', 'GET')
     self.assertEqual(route_scope, u'uapi_orgs_get')
Пример #5
0
 def test_basic_id_route_to_scope(self):
     route_scope = qvarn.route_to_scope('/orgs/<item_id>', 'PUT')
     self.assertEqual(route_scope, u'uapi_orgs_id_put')
Пример #6
0
 def _get_current_scope(self):
     route_rule = bottle.request.route.rule
     request_method = bottle.request.method
     return qvarn.route_to_scope(route_rule, request_method)
Пример #7
0
 def _get_current_scope(self):
     route_rule = bottle.request.route.rule
     request_method = bottle.request.method
     return qvarn.route_to_scope(route_rule, request_method)
Пример #8
0
 def test_listener_notification_route_to_scope(self):
     route_scope = qvarn.route_to_scope(
         '/orgs/listeners/<id>/notifications/<id>', 'DELETE')
     self.assertEqual(route_scope,
                      u'uapi_orgs_listeners_id_notifications_id_delete')
Пример #9
0
 def test_search_route_to_scope(self):
     route_scope = qvarn.route_to_scope(
         '/orgs/search/<search_criteria:path>', 'GET')
     self.assertEqual(route_scope, u'uapi_orgs_search_id_get')
Пример #10
0
 def test_basic_subitem_route_to_scope(self):
     route_scope = qvarn.route_to_scope('/orgs/<item_id>/document', 'PUT')
     self.assertEqual(route_scope, u'uapi_orgs_id_document_put')
Пример #11
0
 def test_basic_id_route_to_scope(self):
     route_scope = qvarn.route_to_scope('/orgs/<item_id>', 'PUT')
     self.assertEqual(route_scope, u'uapi_orgs_id_put')
Пример #12
0
 def test_basic_route_to_scope(self):
     route_scope = qvarn.route_to_scope('/orgs', 'GET')
     self.assertEqual(route_scope, u'uapi_orgs_get')