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

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

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

push

travis-ci

kanemathers
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"

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 187.1 (TELNYX_MOCK_VERSION=0.8.6) 01 Apr 2020 07:00AM UTC 0
95.19
Travis Job 187.1
2 187.2 (TELNYX_MOCK_VERSION=0.8.6) 01 Apr 2020 07:00AM UTC 0
95.27
Travis Job 187.2
3 187.3 (TELNYX_MOCK_VERSION=0.8.6) 01 Apr 2020 07:00AM UTC 0
95.27
Travis Job 187.3
4 187.4 (TELNYX_MOCK_VERSION=0.8.6) 01 Apr 2020 07:00AM UTC 0
95.27
Travis Job 187.4
5 187.5 (TELNYX_MOCK_VERSION=0.8.6) 01 Apr 2020 07:03AM UTC 0
95.27
Travis Job 187.5
6 187.6 (TELNYX_MOCK_VERSION=0.8.6) 01 Apr 2020 07:02AM UTC 0
95.27
Travis Job 187.6
7 187.7 (TELNYX_MOCK_VERSION=0.8.6) 01 Apr 2020 07:02AM UTC 0
95.32
Travis Job 187.7
8 187.8 (TELNYX_MOCK_VERSION=0.8.6) 01 Apr 2020 07:02AM UTC 0
95.32
Travis Job 187.8
Source Files on build 187
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #187
  • a79583e7 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

© 2026 Coveralls, Inc