Fix NOT PROVIDED default detection.

Turns out that the classes stringify differently on Python 2 and 3, this patch
fixes it.
Fix json loading problems.

As json on python 3 only wants a str object while the testing client only
provides a bytes one, we have to use smart_text to coax the text to the right
format.