old_contents: import os
  from burpui import app, bui
  import unittest
  import urllib2
  import pprint
  from flask.ext.testing import LiveServerTestCase, TestCase
  
  class BurpuiLiveTestCase(LiveServerTestCase):
  
  	def create_app(self):
  		app.config['TESTING'] = True
  		app.config['LIVESERVER_PORT'] = 5001
  		bui.setup(conf = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'burpui.cfg'))
  		return app
  
  #	def setUp(self):
  
  #	def tearDown(self):
  #		print 'Test Finished!\n'
  
  	def test_server_is_up_and_running(self):
  		response = urllib2.urlopen(self.get_server_url())
  		self.assertEqual(response.code, 200)
  
  class BurpuiTestCase(TestCase):
  
  	def create_app(self):
  		app.config['TESTING'] = True
  		bui.burpport = 9999
  		return app
  
  	def test_some_json(self):
  		response = self.client.get('/api/clients.json')
  		self.assertEquals(response.json, dict(results=[]))
  
  
  if __name__ == '__main__':
  	unittest.main()
  
new_contents: #!/usr/bin/env python
  # -*- coding: utf8 -*-
  import os
  from burpui import app, bui
  import unittest
  import urllib2
  import pprint
  from flask.ext.testing import LiveServerTestCase, TestCase
  
  class BurpuiLiveTestCase(LiveServerTestCase):
  
  	def create_app(self):
  		conf = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'burpui.cfg')
  		app.config['TESTING'] = True
  		app.config['LIVESERVER_PORT'] = 5001
  		app.config['CFG'] = conf
  		bui.setup(conf)
  		return app
  
  #	def setUp(self):
  
  #	def tearDown(self):
  #		print 'Test Finished!\n'
  
  	def test_server_is_up_and_running(self):
  		response = urllib2.urlopen(self.get_server_url())
  		self.assertEqual(response.code, 200)
  
  class BurpuiTestCase(TestCase):
  
  	def create_app(self):
  		app.config['TESTING'] = True
  		bui.burpport = 9999
  		return app
  
  	def test_some_json(self):
  		response = self.client.get('/api/clients.json')
  		self.assertEquals(response.json, dict(results=[]))
  
  
  if __name__ == '__main__':
  	unittest.main()
  
subject: fix unit test