

def test_init_args(self):
    '\n        Test whether passing translated attributes to __init__() works.\n        '
    x = SimpleModel(tr_title='TRANS_TITLE')
    self.assertEqual(x.tr_title, 'TRANS_TITLE')
    y = SimpleModel(tr_title='TRANS_TITLE', _current_language='nl')
    self.assertEqual(y.get_current_language(), 'nl')
    self.assertEqual(y.tr_title, 'TRANS_TITLE')

dataset/ETHPy150Open edoburu/django-parler/parler/tests/test_model_attributes.py ModelAttributeTests.test_init_args/original