There are a lot of strings being combined with %-notation in here. Please use the new .format() notation for string formatting instead, as %-notation is deprecated. As the new notation uses {0} for example as insertion markers, you probably should use unicode({u'{0}'.format(SAMPLE_KEY): u'{0}'.format(SAMPLE_VALUE)}) for this perhaps.
+SAMPLE_RESOURCE = '{"%s": "%s"}' % (SAMPLE_KEY, SAMPLE_VALUE)
There are a lot of strings being combined with %-notation in here. Please use the new .format() notation for string formatting instead, as %-notation is deprecated. As the new notation uses {0} for example as insertion markers, you probably should use unicode( {u'{0}' .format( SAMPLE_ KEY): u'{0}'. format( SAMPLE_ VALUE)} ) for this perhaps.