Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webapp/glyph.py: fix incorrect display of 'title' URI parameter #1784

Merged
merged 1 commit into from Mar 19, 2017

Conversation

Marek77
Copy link
Contributor

@Marek77 Marek77 commented Jan 3, 2017

When passing an URI-encoded string (e.g. '&title=Hello%20World%21'), display 'Hello World!' instead in graph title.

Graph before the fix:
test_uri_bad

Fixed version:
test_uri_good

        When passsing an URI-encoded string (e.g. '&title=Hello%20World%21'),
        display 'Hello World!' instead in graph title.
@codecov-io
Copy link

codecov-io commented Jan 3, 2017

Current coverage is 66.50% (diff: 0.00%)

Merging #1784 into master will not change coverage

@@             master      #1784   diff @@
==========================================
  Files            55         55          
  Lines          6276       6276          
  Methods           0          0          
  Messages          0          0          
  Branches       1247       1243     -4   
==========================================
  Hits           4174       4174          
  Misses         1878       1878          
  Partials        224        224          

Powered by Codecov. Last update 73bc058...eeaa965

@obfuscurity
Copy link
Member

Would you mind adding tests for this?

@Marek77
Copy link
Contributor Author

Marek77 commented Jan 5, 2017

As the fix changes the generated image, I admit I have hard time seeing what to test and how.

@iksaif
Copy link
Member

iksaif commented Mar 3, 2017

I guess you can mock drawVTitle to validate that its being called with the correct argument

@deniszh
Copy link
Member

deniszh commented Mar 18, 2017

Not sure if a test is needed here. unquote_plus() in known function and fix is quite minor.

@cbowman0 cbowman0 self-requested a review March 18, 2017 18:20
Copy link
Member

@cbowman0 cbowman0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make test coverage for this is a large effort because of the lack of general test coverage in glyph.pp. I'm comfortable with this change.

@deniszh
Copy link
Member

deniszh commented Mar 19, 2017

Thanks! Merging

@deniszh deniszh merged commit 38c928e into graphite-project:master Mar 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants