MCPcopy
hub / github.com/django/django / make_test_state

Method make_test_state

tests/migrations/test_base.py:264–272  ·  view source on GitHub ↗

Makes a test state using set_up_test_model and returns the original state and the state after the migration is applied.

(self, app_label, operation, **kwargs)

Source from the content-addressed store, hash-verified

262 return migration.unapply(project_state, editor)
263
264 def make_test_state(self, app_label, operation, **kwargs):
265 """
266 Makes a test state using set_up_test_model and returns the
267 original state and the state after the migration is applied.
268 """
269 project_state = self.set_up_test_model(app_label, **kwargs)
270 new_state = project_state.clone()
271 operation.state_forwards(app_label, new_state)
272 return project_state, new_state
273
274 def set_up_test_model(
275 self,

Calls 3

set_up_test_modelMethod · 0.95
cloneMethod · 0.45
state_forwardsMethod · 0.45

Tested by

no test coverage detected