class Test2: seq = Sequence(primary_key=True) test = Many2One(model=Model.Test)
class Test: id = Integer(primary_key=True) seq = Sequence(primary_key=True, formater="V-{seq}")
def test_string_to_sequence_with_diff_size(self): self.diff_type(String(size=10), Sequence(size=20))
def test_forbid_function_sequence(self): with pytest.raises(FieldException): Contextual(field=Sequence(), identity='foo')
def test_string_to_sequence_with_default_size(self): self.same_type(String(), Sequence())