def __str__(self): return str(self.name)
def __str__(self): return str(getattr(self, self._fields[0]))
def test_str(self): account_obj = models.Account(name='Salary') assert str(account_obj) == 'Salary'
def test_unicode(self): account_obj = models.Account(name='משכורת') assert str(account_obj) == 'משכורת'