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

team-telnyx / telnyx-python / 205 / 1
93%
master: 93%

Build:
DEFAULT BRANCH: master
Ran 02 Apr 2020 08:17AM UTC
Files 42
Run time 38s
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

02 Apr 2020 08:16AM UTC coverage: 95.193% (-0.05%) from 95.245%
TELNYX_MOCK_VERSION=0.8.6

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"

1307 of 1373 relevant lines covered (95.19%)

0.95 hits per line

Source Files on job 205.1 (TELNYX_MOCK_VERSION=0.8.6)
  • Tree
  • List 0
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 150
  • Travis Job 205.1
  • 30b1f662 on github
  • Prev Job for TELNYX_MOCK_VERSION=0.8.6 on master (#183.3)
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