Skip to content

Commit

Permalink
[fix] #76 - addressing deserialization error
Browse files Browse the repository at this point in the history
  • Loading branch information
grindsa committed Nov 15, 2021
1 parent 26a642a commit b420e5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion acme_srv/authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _authz_info(self, url):
# add fildcard flag into authoritzation response
if auth_info[0]['value'].startswith('*.'):
self.logger.debug('Authorization._authz_info() - adding wildcard flag')
authz_info_dic['wildcard'] = 'true'
authz_info_dic['wildcard'] = True
else:
authz_info_dic['status'] = 'pending'

Expand Down
2 changes: 1 addition & 1 deletion test/test_authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def test_016_authorization__authz_info(self, mock_name, mock_uts, mock_challenge
mock_challengeset.return_value = [{'key1' : 'value1', 'key2' : 'value2'}]
self.authorization.dbstore.authorization_update.return_value = 'foo'
self.authorization.dbstore.authorization_lookup.return_value = [{'type' : 'type', 'value' : '*.bar.local', 'status__name' : 'foo'}]
result = {'expires': '2018-12-02T05:00:00Z', 'status': 'foo', 'challenges': [{'key1': 'value1', 'key2': 'value2'}], 'identifier': {'type': 'type', 'value': '*.bar.local'}, 'wildcard': 'true'}
result = {'expires': '2018-12-02T05:00:00Z', 'status': 'foo', 'challenges': [{'key1': 'value1', 'key2': 'value2'}], 'identifier': {'type': 'type', 'value': '*.bar.local'}, 'wildcard': True}
self.assertEqual(result, self.authorization._authz_info('http://tester.local/acme/authz/foo'))

@patch('acme_srv.challenge.Challenge.new_set')
Expand Down

0 comments on commit b420e5d

Please sign in to comment.