def test_autouuid_to_string(): ('AutoUUID#to_string() should have cast the value as string') # Given an instance of autouuid autouuid = AutoUUID() # When I call to_string result = autouuid.to_string(str(test_uuid)) # Then the result should be a string result.should.be.a(bytes)