def test_delete_queue(self): request = Request(post={'token': 't', 'domain': 'x.com'}) queue = filter(None, views.new_queue(request)['queue'].split('/'))[-1] request = Request(params={'token': 't'}, matchdict={'queue': queue}) views.delete_queue(request) eq_(views.get_queues(Request(params={'token': 't'})), {})
def test_get_queues(self): token = views.new_token(Request())['token'] request = Request(post={'token': token, 'domain': 'domain'}) queue = views.new_queue(request)['queue'] request = Request(params={'token': token}) response = views.get_queues(request) eq_(response, {'domain': queue})