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

ucfopen / canvasapi / 1220 / 3
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: develop
DEFAULT BRANCH: master
Ran 26 Nov 2020 03:43AM UTC
Files 67
Run time 6s
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

25 Nov 2020 10:13PM UTC coverage: 100.0%. Remained the same
1220.3

push

travis-ci

web-flow
Issue/411 create pairing code (#434)

* Add checks for `context_code` key to announcements

Announcements come in through the `Canvas` object and do not include
a course ID directly. Since announcements are DiscussionTopics, we
can parse the ID from the `context_code` param.

Currently, the Canvas API only supports course-level context codes,
so this works for now, but will break as more contexts are added.

https://canvas.instructure.com/doc/api/announcements.html#method.announcements_api.index

* Update tests for announcements course ID parse

* ignore venv directory

* moved venv with other env/ directories

* more thorough checks for context_codes

* Accept a list of course IDs in get_announcements

Canvas returns announcements from the `canvas` object. The user has to
define which course or courses to pull from. Adding `course_list` as a
required parameter prevents failed calls by exposing this required
parameter to the user.

The list is processed to the `context_codes` format before being sent
in the request.

* update tests

* fix black formatting, added test coverage

* Refactor for more flexible arguments

See https://github.com/ucfopen/canvasapi/pull/421#discussion_r499841262

The requester can handle `Course` objects or plain strings. Handling both
makes it easier on the user because they can reuse a course object they may
already have. Canvas just looks for the `context_code` string.

The `context_codes` param is required by the API. The `get_announcements` function
requires a list of either strings or `Course` objects to request. Formatting
is done by the library before sending to the `Announcements` endpoint.

* Added tests

Wrote tests specifically to accept `Course` objects as items in the
`context_codes` list used to get announcements.

* create `<PairingCode>` class

* Fixes #411 - create pairing codes

Adds endpoint coverage for the `<User>` class to create pairing codes.

Cre... (continued)

3535 of 3535 relevant lines covered (100.0%)

1.0 hits per line

Source Files on job 1220.3
  • Tree
  • List 0
  • Changed 6
  • Source Changed 1
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1056
  • Travis Job 1220.3
  • e9bd3193 on github
  • Prev Job for on develop (#1217.1)
  • Next Job for on develop (#1222.2)
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