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

DavidCain / mitoc-member
95%

Build:
DEFAULT BRANCH: master
Repo Added 17 Aug 2019 11:08PM UTC
Files 24
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

LAST BUILD ON BRANCH master
branch: master
CHANGE BRANCH
x
Reset
  • master
  • build_caching
  • poetry

pending completion
47

push

travis-ci

DavidCain
Correct use of `mock.patch.dict`

Previously, I had falsely assumed that `mock.patch.dict` would overwrite
the dict that it is mocking. This is not actually the case! Rather, the
keys that are specified are *additive*. In order to achieve a complete
replacement of the dictionary, we must pass `clear` first.

The tests were passing previously because our testing instance does not
have any environment variables that conflict with what's expected in the
tests. However, a developer should be able to have as many env vars set
as they like for local development, and run the tests without worrying
that those env vars will change behavior.

76 of 81 branches covered (93.83%)

Branch coverage included in aggregate %.

746 of 784 relevant lines covered (95.15%)

0.95 hits per line

Relevant lines Covered
Build:
Build:
784 RELEVANT LINES 746 COVERED LINES
0.95 HITS PER LINE
Source Files on master
  • List 0
  • Changed 3
  • Source Changed 3
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
47 master Correct use of `mock.patch.dict` Previously, I had falsely assumed that `mock.patch.dict` would overwrite the dict that it is mocking. This is not actually the case! Rather, the keys that are specified are *additive*. In order to achieve a comple... push 14 Sep 2019 11:39PM UTC DavidCain travis-ci pending completion  
46 master Cache pip directory between builds See: https://docs.travis-ci.com/user/caching/ We install `poetry` using `pip`, so caching pip itself will speed up the installation of `pypoetry`! In our `.travisy.yml`, we might consider installing `poetry` wi... push 20 Aug 2019 03:03AM UTC DavidCain travis-ci pending completion  
42 master Testing pip caching api 20 Aug 2019 02:48AM UTC DavidCain travis-ci pending completion  
40 master Add an extremely simple wsgi test Testing a file that's basically a single line of code is a bit contrived (especially since the true test is an end-to-end integration test that actually spins up a server with WSGI). In any case though, this at l... push 19 Aug 2019 12:23AM UTC DavidCain travis-ci pending completion  
39 master Also test behavior when Sentry not config'd This makes sure that the route works when Sentry is not configured, but the external API is down! push 18 Aug 2019 11:55PM UTC DavidCain travis-ci pending completion  
37 master Test membership without signature verification Processing memberships without verifying the CyberSource signature is unfortunately how things work in production. We support this behavior in the first place since MITOC does not actually have acce... push 18 Aug 2019 08:34PM UTC DavidCain travis-ci pending completion  
36 master Add coverage for waiver-adding route This test has a _lot_ more mocking than I would like. However, we'll soon be ripping out the direct database interaction of `mitoc-member` and replacing it with API calls. Most of the `db.<method>` invocations... push 18 Aug 2019 01:39AM UTC DavidCain travis-ci pending completion  
35 master Add test coverage for `other_verified_emails` push 18 Aug 2019 01:10AM UTC DavidCain travis-ci pending completion  
34 master Use mock.patch.object where sensible Rather than worrying about the exact import path we're mocking, I often prefer to just mock directly from an object. I think this is more readable, and also ensures that we're properly mocking the actual object. push 18 Aug 2019 12:25AM UTC DavidCain travis-ci pending completion  
See All Builds (16)
  • Repo on GitHub
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

© 2025 Coveralls, Inc