Adding unit tests for the  and  methods. Converted assertions for type str to basestring.