mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
README updates
This commit is contained in:
parent
1189ce033a
commit
a6e97626ba
@ -47,3 +47,19 @@ examples
|
||||
|
||||
objects = create_organization('test-org', persisted=False)
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user