Fix comments and unittest for market.py and style

Trying to make the right commit to  the develop branch.
I think you meant ```if 'privkey' in settings else ''````.  I'll fix it for you in my PR.