Skip to content

Commit

Permalink
add unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
atupal committed Jun 17, 2013
1 parent 601240c commit 8886266
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 0 deletions.
Binary file added dianzan/server-sae/application/__init__.pyc
Binary file not shown.
Binary file added dianzan/server-sae/application/apps/__init__.pyc
Binary file not shown.
Binary file added dianzan/server-sae/application/apps/dianzan.pyc
Binary file not shown.
Binary file added dianzan/server-sae/application/views/__init__.pyc
Binary file not shown.
Binary file added dianzan/server-sae/application/views/index.pyc
Binary file not shown.
17 changes: 17 additions & 0 deletions dianzan/server-sae/runserver.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

import os, sys
sys.path.append(os.path.realpath(__file__))

from application import app

#def app(environ, start_response):
# status = '200 OK'
# response_headers = [('Content-type', 'text/html; charset=utf-8')]
# start_response(status, response_headers)
# return ['<strong>Welcome to SAE!</strong>']

if "HOME" in os.environ.keys() and os.environ['HOME'] == "/home/atupal":
app.run('0.0.0.0', 8080)
else:
import sae
application = sae.create_wsgi_app(app)
25 changes: 25 additions & 0 deletions dianzan/server-sae/testsuite/base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

import unittest
import sys
import os
sys.path.append(os.path.realpath('../'))
import application

class _3gqq67TestCase(unittest.TestCase):
def setUp(self):
self.app = application.app.test_client()

def tearDown(self):
pass

def test_1(self):
assert 'select' in self.app.get('/').data

def test_2(self):
self.app.get('/')

def test_3(self):
self.app.get('/')

if __name__ == "__main__":
unittest.main()

0 comments on commit 8886266

Please sign in to comment.