• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PulpQE / pulp-smash / 37
63%

Build:
DEFAULT BRANCH: master
Ran 16 Oct 2015 09:16PM UTC
Jobs 4
Files 1
Run time 29s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
37

push

travis-ci

Ichimonji10
Overhaul the ServerConfig class

Leave the `ServerConfig` class and its helper, `get_config`, in module
`pulp_smash.config`. However, significantly change them. Change `ServerConfig`
from a dict-like object with several mixins to a plain old object. According to
its docstring:

    This object stores a set of facts that are used when communicating with a
    Pulp server. A typical usage of this object is as follows:

    >>> import requests
    >>> from pulp_smash.config import ServerConfig
    >>> cfg = ServerConfig(
    ...     base_url='https://pulp.example.com',
    ...     auth=('username', 'password'),
    ...     verify=False,  # Disable SSL verification
    ... )
    >>> response = requests.post(
    ...     cfg.base_url + '/pulp/api/v2/actions/login/',
    ...     **cfg.get_requests_kwargs()
    ... )

Fix #12 by only giving the object instance attributes. Fix #16 by making the
class inherit directly from `object`. As a bonus, the class is now entirely
self-contained and reasonably sized, which should aid with comprehension. This
change also targets #13, as each of the file-oriented methods has the ability to
select a particular XDG configuration directory or file if appropriate. For
example, here is `read`'s signature:

    def read(self, section=None, xdg_config_file=None, xdg_config_dir=None):

Update the existing test code to use the new object. Test results:

    $ python -m unittest2 discover pulp_smash.tests
    ....F...
    …
    ----------------------------------------------------------------------
    Ran 8 tests in 4.006s

    FAILED (failures=1)

The one test failure is expected.

Unit test the new class.

81 of 91 relevant lines covered (89.01%)

3.56 hits per line

Jobs
ID Job ID Ran Files Coverage
1 37.1 16 Oct 2015 09:16PM UTC 0
89.01
Travis Job 37.1
2 37.2 16 Oct 2015 09:17PM UTC 0
89.01
Travis Job 37.2
3 37.3 16 Oct 2015 09:16PM UTC 0
89.01
Travis Job 37.3
4 37.4 16 Oct 2015 09:16PM UTC 0
89.01
Travis Job 37.4
Source Files on build 37
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #37
  • 8f7dea36 on github
  • Next Build on master (#39)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc