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

team-telnyx / telnyx-python / 205
93%

Build:
DEFAULT BRANCH: master
Ran 02 Apr 2020 08:17AM 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
205

push

travis-ci

web-flow
ENGDESK-4618: Rewrite reserved words on nested resource class methods (#21)

`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 205.1 (TELNYX_MOCK_VERSION=0.8.6) 02 Apr 2020 08:17AM UTC 0
95.19
Travis Job 205.1
2 205.2 (TELNYX_MOCK_VERSION=0.8.6) 02 Apr 2020 08:17AM UTC 0
95.27
Travis Job 205.2
3 205.3 (TELNYX_MOCK_VERSION=0.8.6) 02 Apr 2020 08:17AM UTC 0
95.27
Travis Job 205.3
4 205.4 (TELNYX_MOCK_VERSION=0.8.6) 02 Apr 2020 08:17AM UTC 0
95.27
Travis Job 205.4
5 205.5 (TELNYX_MOCK_VERSION=0.8.6) 02 Apr 2020 08:21AM UTC 0
95.27
Travis Job 205.5
6 205.6 (TELNYX_MOCK_VERSION=0.8.6) 02 Apr 2020 08:19AM UTC 0
95.27
Travis Job 205.6
7 205.7 (TELNYX_MOCK_VERSION=0.8.6) 02 Apr 2020 08:19AM UTC 0
95.32
Travis Job 205.7
8 205.8 (TELNYX_MOCK_VERSION=0.8.6) 02 Apr 2020 08:19AM UTC 0
95.32
Travis Job 205.8
Source Files on build 205
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #205
  • 30b1f662 on github
  • Prev Build on master (#183)
  • Next Build on master (#210)
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