Skip to content

Commit

Permalink
Updated pywbem_mock docs and some code changes
Browse files Browse the repository at this point in the history
Code changes:
- Changes in FakedWBEMConnection class:
  - Changed approach for default namespace to be compatible to
    'WBEMConnection': The ctor now has a 'default_namespace' parameter which
    takes a user-provided default namespace that sticks with the connection,
    and that defaults to DEFAULT_NAMESPACE. Previously, it was hard coded to
    DEFAULT_NAMESPACE. This parameter was inserted at the front.
  - Changed the default values of ctor parameters 'repo_lite' and 'verbose'
    to be the documented default values 'False' instead of 'None'.
  - Changed the 'get_...._repo()' methods to become internal by adding an
    underscore prefix.
  - In 'display_repository(), changed the default values of parameters
    'summary' to 'False' and 'output_format' to '"mof"', which are their
    documented default values, instead of defaulting them to 'None'.
  - Fixed an error in the testcase for repr() where "delay=" was expected
    by changing that to the actual value "response_delay".

Docs changes:
- Moved description from module docstring into the 'Overview' section of the
  rst file, eliminating duplications.
- The module docstring is now a dummy text that points to the rst file;
  therefore no longer embedding the module docstring into the rst file.
- Improved the 'Overview' section in the rst file.
- Improved docstrings of the 'FakedWBEMConnection' class and of all of its
  public methods.
- Fixed 'milliseconds' in description of the 'response_delay' ctor parameter
  to 'seconds'. Fixed its type to be 'number' (was: 'int') which covers both
  'int' and 'float'.
- Fixed broken links and layout / formatting.
- Used consistent terms: "faked connection" and "mock repository".

Signed-off-by: Andreas Maier <maiera@de.ibm.com>
  • Loading branch information
andy-maier committed Jan 9, 2018
1 parent ee9844a commit bb13e3a
Show file tree
Hide file tree
Showing 3 changed files with 459 additions and 421 deletions.
Loading

0 comments on commit bb13e3a

Please sign in to comment.