This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a few basic pages tests ahead of #406
- Loading branch information
1 parent
81bd5e5
commit 6698900
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from gittip.testing import serve_request, load, setup_tips | ||
|
||
|
||
def test_homepage(): | ||
actual = serve_request('/').body | ||
expected = "Gittip happens every Thursday." | ||
assert expected in actual, actual | ||
|
||
def test_profile(): | ||
with load(*setup_tips(("cheese", "puffs", 0))): | ||
expected = "I’m grateful for tips" | ||
actual = serve_request('/cheese/').body | ||
assert expected in actual, actual | ||
|
||
def test_widget(): | ||
with load(*setup_tips(("cheese", "puffs", 0))): | ||
expected = "javascript: window.open" | ||
actual = serve_request('/cheese/widget.html').body | ||
assert expected in actual, actual | ||
|
||
|
||
# These hit the network. | ||
|
||
def test_github_proxy(): | ||
expected = "<b>lgtest</b> has not joined" | ||
actual = serve_request('/on/github/lgtest/').body | ||
assert expected in actual, actual | ||
|
||
def test_twitter_proxy(): | ||
expected = "<b>Twitter</b> has not joined" | ||
actual = serve_request('/on/twitter/twitter/').body | ||
assert expected in actual, actual |