def test_set_field2(self): u = Fields() u.add(U1('cmd')) u.add(U1('val')) u.cmd = 1 u.val = 3 assert u._fields['cmd'].value == 1 assert u._fields['val'].value == 3
def test_set_field1(self): u = Fields() u.add(U1('cmd')) u.cmd = 1 assert u._fields['cmd'].value == 1