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

ucfopen / canvasapi / 1220
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: develop
DEFAULT BRANCH: master
Ran 26 Nov 2020 02:49AM UTC
Jobs 3
Files 67
Run time 55min
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
1220

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)

3521 of 3521 relevant lines covered (100.0%)

3.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1220.1 26 Nov 2020 02:49AM UTC 0
100.0
Travis Job 1220.1
2 1220.2 26 Nov 2020 03:39AM UTC 0
100.0
Travis Job 1220.2
3 1220.3 26 Nov 2020 03:43AM UTC 0
100.0
Travis Job 1220.3
Source Files on build 1220
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1220
  • e9bd3193 on github
  • Prev Build on develop (#1217)
  • Next Build on develop (#1222)
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