- Nothing changed yet.
- Add support for
epoch_now_in_ms
(thanks to @chunyan)
- Add
deep_inherit
to allow nested inheritance of fields.
- Added
!now_naive
YAML file command to return naive datetime.
- Fixed anonymous list objects name resolution (thanks to @jvrsantacruz)
- Breaking change: the
!now
YAML command now returns timezone-aware datetime by default. You can change that behavior by changing charlatan.file_format.TIMEZONE_AWARE. - Fixed bug where uninstalling a sqlalchemy fixture would not commit the delete to the session.
- Fixed bug where dict fixtures could not reference fields from other collections of dicts.
- Fixed bug where
!rel a_database_model.id
, whereid
is a primary key generated by the database, would beNone
because of how fixtures are cached. - Removed
as_list
andas_dict
feature. It was unnecessarily complex and would not play well with caching fixtures.
- Breaking change:
get_builder
anddelete_builder
arguments were added to :py:class:`charlatan.FixturesManager`. - Breaking change:
delete_instance
,save_instance
methods were deleted in favor of using builders (see below). - Breaking change:
fields
argument on :py:class:`charlatan.fixture.Fixture` and fixtures collection class has been renamedoverrides
for consistency reasons. - Breaking change:
attrs
argument on :py:class:`charlatan.FixturesManager` been renamedoverrides
for consistency reasons. - Breaking change: deleting fixtures will not return anything. It used to return the fixture or list of fixtures that were successfully deleted. It has been removed to apply the command query separation pattern. There are other ways to check which fixtures are installed, and hooks or builders can be used to customize deletion.
- Breaking change:
do_not_save
anddo_not_delete
arguments have been removed from all functions, in favor of using builders. - The notion of :py:class:`charlatan.builder.Builder` was added. This allows
customizing how fixtures are instantiated and installed. A
builder
argument has been added to most method dealing with getting, installing or deleting fixtures. Sane defaults have been added in most places. - Improve documentation about using pytest with charlatan.
- Fix bug preventing being able to load multiple fixtures file.
- Do not install the class'
fixtures
variable on :py:class:`charlatan.FixturesManagerMixin` initialization. This can lead to bad pattern where a huge list of fixtures is installed for each test, even though each test uses only a few. Also, it's safer to be explicit about this behavior and let the user have this automatic installation. Note that you can easily reimplement this behavior by subclassing or installing those in the classsetUp
method.
- Fix getting relationships with fields that are nested more than one level
- Get
utcnow
at fixture instantiation time, to allow usingfreezegun
intuitively
- Fix saving collection of fixtures to database (thanks to @joegilley)
- Support loading of globbed filenames
- Support loading of multiple fixtures files
- Remove include_relationships option in instance creation
- Update PYYaml
- Support loading all strings as unicode
- Fix getting attribute from relationships
- Add support for Python 3
- Add ability to uninstall fixtures (thanks to @JordanB)
- Numerous tests added, a lot of cleanup.
- Clarification in documentation.
- Remove
load
,set_hook
andinstall_all_fixtures
shortcuts from charlatan package. - Remove
FIXTURES_MANAGER
singleton. Removecharlatan.fixtures_manager
shortcut. - Remove
db_session
argument toFixturesManager.load
. - Add
db_session
argument toFixturesManager
constructor. - Remove
charlatan.fixtures_manager.FixturesMixin
. Replaced bycharlatan.testcase.FixturesManagerMixin
. FixturesManagerMixin
now exposes pretty much the same method asFixturesManager
.FixturesManagerMixin
'suse_fixtures_manager
was renamedinit_fixtures
.
- Add
!epoch_now
for Unix timestamps (thanks to @erikformella)
- Add ability to point to a list fixture (thanks to @erikformella)
- Add ability to define dependencies outside of fields through the depend_on key in the yaml file (thanks to @Roguelazer)
- Fix regression that broke API. install_fixture started returning the fixture as well as its name. (thanks to @erikformella)
- Allow relationships to be used in dicts and lists. (thanks to @erikformella)
- Allow for seconds and minutes in relative timestamps (thanks to @kmnovak)
- Empty models are allowed so that dict ands lists can be used as fixtures.
- Fixtures can now inherits from other fixtures.
- Added ability to link to a relationship's attribute in YAML file.
- Added ability to use
!rel
inpost_creation
.
- Started tracking changes