def test_attribute_assignment_is_ignored_in_default_mode(self): f = Form() f.x = 1 f.A = Form() f.A.y = 2 f._enter_default_mode() f.x = -1 f.y = -2 f.A.x = -3 f.A.y = -4 assert f.x == 1 assert f.y == -2 assert f.A.x == -3 assert f.A.y == 2