blob: d3592f64868dbac870a1ede11221718b7e4473aa (
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"')
|