Skip to content
This repository has been archived by the owner on Dec 23, 2017. It is now read-only.

Commit

Permalink
Merge pull request #70 from 18F/committee_singular
Browse files Browse the repository at this point in the history
Changed committee page route to singular
  • Loading branch information
Marco Segreto committed Apr 9, 2015
2 parents 37d4663 + 0f7efd7 commit f26f089
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def candidate_page(c_id):
data = load_single_type('candidate', c_id)
return render_page('candidate', data)

@app.route('/committees/<c_id>')
@app.route('/committee/<c_id>')
def committee_page(c_id):
data = load_single_type('committee', c_id)
return render_page('committee', data)
Expand Down
6 changes: 3 additions & 3 deletions openfecwebapp/tests/data_prep/candidates_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def create_app(self):
def candidates():
pass

@app.route('/committees/<c_id>')
@app.route('/committee/<c_id>')
def committee_page():
pass

Expand All @@ -29,7 +29,7 @@ def test_map_candidate_page_values(self):
self.assertEqual('D1234', vals['primary_committee']['id'])
self.assertEqual('Friends of McPersonson',
vals['primary_committee']['name'])
self.assertEqual('/committees/D1234',
self.assertEqual('/committee/D1234',
vals['primary_committee']['url'])

self.assertEqual('D1234', vals['authorized_committees'][
Expand All @@ -38,5 +38,5 @@ def test_map_candidate_page_values(self):
vals['authorized_committees']['D1234']['name'])
self.assertEqual('Authorized committee',
vals['authorized_committees']['D1234']['designation'])
self.assertEqual('/committees/D1234',
self.assertEqual('/committee/D1234',
vals['authorized_committees']['D1234']['url'])
14 changes: 3 additions & 11 deletions openfecwebapp/tests/selenium/single_candidate_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ def testSingleCandidatePageLoads(self):

def testCommitteeLink(self):
self.driver.get(self.url)
self.assertEqual(
self.elementExistsByXPath(
'//a[contains(@href, "committees/")]'),
True)
if self.elementExistsByXPath(
'//a[contains(@href, "committees/")]'):
link = self.driver.find_element_by_xpath(
'//a[contains(@href, "committees/")]')
self.assertEqual(
link.text,
'COMMITTEE TO ELECT MARK ALLIEGRO')
self.assertTrue(self.elementExistsByXPath('//a[contains(@href, "committee/")]'))
link = self.driver.find_element_by_xpath('//a[contains(@href, "committees/")]')
self.assertEqual(link.text, 'COMMITTEE TO ELECT MARK ALLIEGRO')
2 changes: 1 addition & 1 deletion openfecwebapp/tests/selenium/single_committee_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class SingleCommitteePageTests(BaseTest):

def setUp(self):
self.url = self.base_url + '/committees/C00550715'
self.url = self.base_url + '/committee/C00550715'

def testSingleCommitteePageLoads(self):
self.driver.get(self.url)
Expand Down

0 comments on commit f26f089

Please sign in to comment.