def with_fixed_values_for(self, **fixtures):
"""
Use fixed values for the given set of attributes.
:param fixtures (attr_name -> attr_value): A mapping of attribute names to static values. These will be used
directly to assign to attribute values on the database record.
:return: Generate
"""
ret = copy.copy(self)
ret.fixtures = copy.copy(self.fixtures)
ret.fixtures.update(fixtures)
return ret
评论列表
文章目录