Updated init_state to include hashed username and password
This commit is contained in:
parent
16017f1154
commit
4ac6f18204
@ -180,7 +180,9 @@ def get_params(request):
|
||||
def service():
|
||||
params = get_params(bottle.request)
|
||||
state = bottle.app().state
|
||||
validate_params(state['config'], params)
|
||||
validate_params(state['hashed_username'],
|
||||
state['hashed_password'],
|
||||
params)
|
||||
if params['reason'] == 0:
|
||||
log.info('Processing an underload of a host %s', params['host'])
|
||||
execute_underload(
|
||||
|
@ -165,7 +165,8 @@ class GlobalManager(TestCase):
|
||||
|
||||
def test_service(self):
|
||||
app = mock('app')
|
||||
state = {'property': 'value'}
|
||||
state = {'hashed_username': 'user',
|
||||
'hashed_password': 'password'}
|
||||
config = {'global_manager_host': 'localhost',
|
||||
'global_manager_port': 8080}
|
||||
app.state = {'state': state,
|
||||
|
Loading…
x
Reference in New Issue
Block a user