Charlatan

Latest version: v0.4.6

Safety actively analyzes 630602 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 5

0.4.1

------------------

- Fixed bug where ``!rel a_database_model.id``, where ``id`` is a primary key
generated by the database, would be ``None`` because of how fixtures are
cached.
- Removed ``as_list`` and ``as_dict`` feature. It was unnecessarily complex and
would not play well with caching fixtures.

0.4.0

------------------

- **Breaking change**: ``get_builder`` and ``delete_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 renamed ``overrides`` for consistency reasons.
- **Breaking change**: ``attrs`` argument on
:py:class:`charlatan.FixturesManager` been renamed ``overrides`` 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`` and ``do_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.

0.3.12

-------------------

- 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
class ``setUp`` method.

0.3.11

-------------------

- Fix getting relationships with fields that are nested more than one level

0.3.10

-------------------

- Get ``utcnow`` at fixture instantiation time, to allow using ``freezegun``
intuitively

0.3.9

------------------

- Fix saving collection of fixtures to database (thanks to joegilley)

Page 2 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.