'Example text to be turned into a base string::
POST /request?b5=%3D%253D&a3=a&c%40=&a2=r%20b HTTP/1.1
Host: example.com
Content-Type: application/x-www-form-urlencoded
Authorization: OAuth realm="Example",
oauth_consumer_key="9djdj82h48djs9d2",
oauth_token="kkk9d7dh3k39sjv7",
oauth_signature_method="HMAC-SHA1",
oauth_timestamp="137131201",
oauth_nonce="7d8f3e4a",
oauth_signature="bYT5CMsGcbgUdFHObYMEfcx6bsw%3D"
Sample Base string generated and tested against::
POST&http%253A%2F%2Fexample.com%2Frequest%253Fb5%253D%25253D%252525
3D%2526a3%253Da%2526c%252540%253D%2526a2%253Dr%252520b&OAuth%2520re
alm%253D%2522Example%2522%252Coauth_consumer_key%253D%25229djdj82h4
8djs9d2%2522%252Coauth_token%253D%2522kkk9d7dh3k39sjv7%2522%252Coau
th_signature_method%253D%2522HMAC-SHA1%2522%252Coauth_timestamp%253
D%2522137131201%2522%252Coauth_nonce%253D%25227d8f3e4a%2522%252Coau
th_signature%253D%2522bYT5CMsGcbgUdFHObYMEfcx6bsw%25253D%2522'

def test_construct_base_string(self):

    self.assertRaises(ValueError, construct_base_string, self.http_method, self.base_string_url, self.normalized_encoded_request_parameters)
    self.assertRaises(ValueError, construct_base_string, self.http_method.decode(u'utf-8'), self.base_string_url, self.normalized_encoded_request_parameters)
    self.assertRaises(ValueError, construct_base_string, self.http_method.decode(u'utf-8'), self.base_string_url.decode(u'utf-8'), self.normalized_encoded_request_parameters)
    base_string = construct_base_string(self.http_method.decode(u'utf-8'), self.base_string_url.decode(u'utf-8'), self.normalized_encoded_request_parameters.decode(u'utf-8'))
    self.assertEqual(self.control_base_string, base_string)
