def test_generate_string_from_invalid_type(self): with self.assertRaises(DBusStructureError) as cm: generate_string_from_data({"x": 1}) self.assertEqual( str(cm.exception), "Fields are not defined at '__dbus_fields__'." )
def __repr__(self): """Generate a string representation.""" return generate_string_from_data( self, skip=["passphrase"], add={"passphrase_set": bool(self.passphrase)} )
def __repr__(self): """Describe the user for easy debugging. As there are many fields many of which might not be set, we only try to list the values that are set. :return: a string describing the UserData instance :rtype: str """ return generate_string_from_data( self, skip=["password"], add={"password_set": bool(self.password)})
def __repr__(self): """Convert this data object to a string.""" return generate_string_from_data( self, skip=["value"], add={"value_set": bool(self.value)} )
def __repr__(self): return generate_string_from_data( obj=self, skip=["b"], add={"b_is_set": bool(self.b)} )
def __repr__(self): return generate_string_from_data(self, skip=["y"], add={"y_set": bool(self.y)})