def test_utf8(self, treq_mock): """Test succesful user authentication.""" username, password = '******', 'hunter2' client = RESTClient( 'http://base/', auth=(username, password), ) client.list( 'resource', params={'search': u"pijamalı hasta yağız şoföre çabucak güvendi"} ) args, kwargs = treq_mock.request.call_args self.assertTrue(kwargs['auth'] == (username, password))