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

team-telnyx / telnyx-python / 188
95%
master: 93%

Build:
Build:
LAST BUILD BRANCH: v2.1.5
DEFAULT BRANCH: master
Ran 01 Apr 2020 07:03AM UTC
Jobs 8
Files 42
Run time 4min
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
188

Pull #21

travis-ci

web-flow
ENGDESK-4618: Rewrite reserved words on nested resource class methods

`nested_resource_class_methods` methods use their own API requestor
instance to make the HTTP request. It was forgotten to rewrite the
reserved words before using them in this request.

When testing this change, I noticed we didn't seem to handle the
returned response at all. If the API returned an response body with
`{"from": "foo"}`, the attribute would be initialised with `obj.from =
"foo"`. This meant future updates would fail as attempting to set
`obj.from` would result in an error due to the reserved keyword. You
would have to use `setattr(obj, "from", "baz")`.

I've fixed this by ensuring reserved words are rewritten not only before
sending them to the API but also when handling the response.

This means you can now do:

    obj = BaseClass.nested_resource.create(from_="foo")
    obj.from_ = "baz"
    obj.save()

    assert obj.from_ == "baz"
Pull Request #21: ENGDESK-4618: Rewrite reserved words on nested resource class methods

8 of 8 new or added lines in 3 files covered. (100.0%)

1306 of 1369 relevant lines covered (95.4%)

7.62 hits per line

Jobs
ID Job ID Ran Files Coverage
1 188.1 (TELNYX_MOCK_VERSION=0.8.6) 01 Apr 2020 07:03AM UTC 0
95.19
Travis Job 188.1
2 188.2 (TELNYX_MOCK_VERSION=0.8.6) 01 Apr 2020 07:03AM UTC 0
95.27
Travis Job 188.2
3 188.3 (TELNYX_MOCK_VERSION=0.8.6) 01 Apr 2020 07:03AM UTC 0
95.27
Travis Job 188.3
4 188.4 (TELNYX_MOCK_VERSION=0.8.6) 01 Apr 2020 07:04AM UTC 0
95.27
Travis Job 188.4
5 188.5 (TELNYX_MOCK_VERSION=0.8.6) 01 Apr 2020 07:07AM UTC 0
95.27
Travis Job 188.5
6 188.6 (TELNYX_MOCK_VERSION=0.8.6) 01 Apr 2020 07:05AM UTC 0
95.27
Travis Job 188.6
7 188.7 (TELNYX_MOCK_VERSION=0.8.6) 01 Apr 2020 07:05AM UTC 0
95.32
Travis Job 188.7
8 188.8 (TELNYX_MOCK_VERSION=0.8.6) 01 Apr 2020 07:05AM UTC 0
95.32
Travis Job 188.8
Source Files on build 188
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #188
  • Pull Request #21
  • PR Base - master (#183)
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