MCPcopy Index your code
hub / github.com/FactoryBoy/factory_boy / reset_sequence

Method reset_sequence

factory/base.py:428–437  ·  view source on GitHub ↗

Reset the sequence counter. Args: value (int or None): the new 'next' sequence value; if None, recompute the next value from _setup_next_sequence(). force (bool): whether to force-reset parent sequence counters in a factory inheritance

(cls, value=None, force=False)

Source from the content-addressed store, hash-verified

426
427 @classmethod
428 def reset_sequence(cls, value=None, force=False):
429 """Reset the sequence counter.
430
431 Args:
432 value (int or None): the new 'next' sequence value; if None,
433 recompute the next value from _setup_next_sequence().
434 force (bool): whether to force-reset parent sequence counters
435 in a factory inheritance chain.
436 """
437 cls._meta.reset_sequence(value, force=force)
438
439 @classmethod
440 def _setup_next_sequence(cls):

Callers 15

test_reset_sequenceMethod · 0.45
setUpMethod · 0.45
test_pk_creationMethod · 0.45
test_pk_force_valueMethod · 0.45
setUpMethod · 0.45
setUpMethod · 0.45
test_creationMethod · 0.45
test_force_pkMethod · 0.45

Calls

no outgoing calls

Tested by 15

test_reset_sequenceMethod · 0.36
setUpMethod · 0.36
test_pk_creationMethod · 0.36
test_pk_force_valueMethod · 0.36
setUpMethod · 0.36
setUpMethod · 0.36
test_creationMethod · 0.36
test_force_pkMethod · 0.36