blob: e07ffb5010066ba5f9db1d7d9e3f735a2e21a70c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
# -*- coding: utf-8 -*-
import bottle
from tools import ServerTestBase
class TestBasicAuth(ServerTestBase):
def test__header(self):
@bottle.route('/')
@bottle.auth_basic(lambda x, y: False)
def test(): return {}
self.assertStatus(401)
self.assertHeader('Www-Authenticate', 'Basic realm="private"')
|