Skip to content

Commit

Permalink
Merge pull request #46 from NCSU-SE-2024/update_images_channel_homepage
Browse files Browse the repository at this point in the history
resolved test-app pylint errors
  • Loading branch information
anish-dhage authored Nov 1, 2024
2 parents 333c89f + 886c10d commit 313b531
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def test_filter_jobs_route(self):
"dept_filter": "Engineering",
"company_filter": "TechCorp"
})
assert response.status_code == 200
assert response.status_code == 200

def test_view_forum_topic_route(self):
"""Test viewing a specific forum topic."""
Expand All @@ -520,20 +520,23 @@ def test_my_jobs_route(self):
assert response.status_code == 200

def test_get_user_logged_in(self):
"""Test for logging in users."""
with self.client as client:
with client.session_transaction() as session:
session['username'] = 'testuser'
response = client.get('/api/getUser')
assert response.status_code == 200
assert response.json == 'testuser'

def test_get_user_not_logged_in(self):
"""Test for wgat if user not logged in."""
with self.client as client:
response = client.get('/api/getUser')
assert response.status_code == 200
assert response.json == ''

def test_get_user_session_key_none(self):
"""Test for None user."""
with self.client as client:
with client.session_transaction() as session:
session['username'] = None
Expand Down

0 comments on commit 313b531

Please sign in to comment.