Merge lp://qastaging/~coreygoldberg/selenium-simple-test/assert-url-domain into lp://qastaging/selenium-simple-test

Proposed by Corey Goldberg
Status: Merged
Approved by: Corey Goldberg
Approved revision: 371
Merged at revision: 368
Proposed branch: lp://qastaging/~coreygoldberg/selenium-simple-test/assert-url-domain
Merge into: lp://qastaging/selenium-simple-test
Diff against target: 97 lines (+58/-12)
3 files modified
src/sst/actions.py (+16/-4)
src/sst/selftests/assert_urls.py (+42/-0)
src/sst/selftests/url_contains.py (+0/-8)
To merge this branch: bzr merge lp://qastaging/~coreygoldberg/selenium-simple-test/assert-url-domain
Reviewer Review Type Date Requested Status
Leo Arias (community) code review Approve
Review via email: mp+157640@code.qastaging.launchpad.net

Commit message

assert_url_network_location and more tests

Description of the change

- added 'assert_url_network_location' action.
- updated tests for all assert_url* actions

see the new tests in the diff.. they show various assertions of urls, using:
- assert_url
- assert_url_contains
- assert_url_network_location

I didn't think it was necessary to implement `assert_url_path`, as the same can be achieved using `urlparse` with `assert_url`, or by using `assert_url_contains` with a regex. (see tests for examples)

To post a comment you must log in.
371. By Corey Goldberg

changed assert_url_domain to assert_url_network_location, updated tests

Revision history for this message
Corey Goldberg (coreygoldberg) wrote :

from #u1-reviews:

 assert_url_netloc ? or assert_network_location?
 elopio, yup.. i'll move the msg inside the if
<elopio> cgoldberg: I like assert_network_location
<elopio> I had no idea what was netloc before you explained it.
<cgoldberg> ah
<elopio> still I wouldn't have know what's network locaation, but a comment on the function will help on that.
<cgoldberg> I'll add to docstring an explanation
 i sorta like keeping it under assert_url_* for API organization. but 'assert_url_network_location' is getting too long
<elopio> cgoldberg: I like long names, so that one doesn't botter me. But as you prefer.
 cgoldberg: I think that the expression I will use is assert_url_contains('.*/begin', regex=True)
<elopio> it would be nice to add that to the tests.
<cgoldberg> ok.. i think I prefer a longer name in this case... so we can keep it under assert_url. i'll change to .. assert_url_network_location
 elopio, i have almost that same case: assert_url_contains('http://.*/begin', regex=True)
 but i'll add your specfic one also
 i'll make these changes now and re-push. 1 sec

Revision history for this message
Leo Arias (elopio) wrote :

Thanks.

review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches