Beispiel #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')
Beispiel #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')
Beispiel #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')
Beispiel #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')
Beispiel #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')
Beispiel #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)
Beispiel #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)
Beispiel #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')
Beispiel #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')
Beispiel #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')
Beispiel #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')
Beispiel #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')