Skip to content

Commit

Permalink
remove unused code and add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
datashaman committed Nov 23, 2017
1 parent cc46b13 commit 5fa0b5e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 36 deletions.
1 change: 0 additions & 1 deletion app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

from app import constants

from app.admin import VoucherAdmin
from app.models import User, Role, db, users
from app.resources import GatewayResource, \
NetworkResource, \
Expand Down
35 changes: 0 additions & 35 deletions app/admin.py

This file was deleted.

12 changes: 12 additions & 0 deletions tests/test_wifidog.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,15 @@ def test_login_with_invalid_gw_id(self):
def test_login_with_valid_gw(self):
response = self.client.get('/wifidog/login/?gw_id=main-gateway1')
self.assertEqual(200, response.status_code)

def test_portal_without_gw_id(self):
response = self.client.get('/wifidog/portal/')
self.assertEqual(404, response.status_code)

def test_portal_with_invalid_gw_id(self):
response = self.client.get('/wifidog/portal/?gw_id=foobar')
self.assertEqual(404, response.status_code)

def test_portal_with_valid_gw(self):
response = self.client.get('/wifidog/portal/?gw_id=main-gateway1')
self.assertEqual(200, response.status_code)

0 comments on commit 5fa0b5e

Please sign in to comment.