subclient tokens: bugfix & return proper data.

Also introduces responses, as an alternative to httpretty (it works
better).
This commit is contained in:
2016-04-12 15:24:50 +02:00
parent e0460f8518
commit aeee165ad8
5 changed files with 76 additions and 15 deletions

View File

@@ -3,6 +3,7 @@ import copy
import sys
import logging
import os
import base64
from bson import ObjectId
from eve.tests import TestMinimal
@@ -101,3 +102,7 @@ class AbstractPillarTest(TestMinimal):
'status': 'success'}),
content_type="application/json")
def make_header(self, username, password=''):
"""Returns a Basic HTTP Authentication header value."""
return 'basic ' + base64.b64encode('%s:%s' % (username, password))