mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
README updates
This commit is contained in:
@@ -47,3 +47,19 @@ examples
|
|||||||
|
|
||||||
objects = create_organization('test-org', persisted=False)
|
objects = create_organization('test-org', persisted=False)
|
||||||
assert not objects.organization.pk
|
assert not objects.organization.pk
|
||||||
|
|
||||||
|
patterns
|
||||||
|
--------
|
||||||
|
|
||||||
|
`mk` functions are single object fixtures. They should create only a single object with the minimum deps.
|
||||||
|
They should also accept a `persited` flag, if they must be persisted to work, they raise an error if persisted=False
|
||||||
|
|
||||||
|
`generate` and `apply` functions are helpers that build up the various parts of a `create` functions objects. These
|
||||||
|
should be useful for more than one create function to use and should explicitly accept all of the values needed
|
||||||
|
to execute. These functions should also be robust and have very speciifc error reporting about constraints and/or
|
||||||
|
bad values.
|
||||||
|
|
||||||
|
`create` functions compose many of the `mk` and `generate` functions to make different object
|
||||||
|
factories. These functions when giving the minimum set of arguments should only produce a
|
||||||
|
single artifact (or the minimum needed for that object). These should be wrapped by discoverable
|
||||||
|
fixtures in various conftest.py files.
|
||||||
|
|||||||
Reference in New Issue
Block a user