Commits

Anonymous committed 4ab1ed0

added some more tests

Comments (0)

Files changed (7)

companies/tests.py

 	def test_index(self):	
 		resp = self.client.get('/');
 		self.assertEqual(resp.status_code, 200);
+		self.assertTemplateUsed(resp, "home.html");		
 		
 	def test_sign_up(self):
 		resp = self.client.get('/sign_up');
 		self.assertEqual(resp.status_code, 200);
+		self.assertTemplateUsed(resp, "sign_up.html");
 		
 	def test_search_by_zip(self):
 		resp = self.client.get('/search_by_zip?zipa=10012');
 		self.assertEqual(resp.status_code, 200);
+		self.assertTemplateUsed(resp, "results.html");
 	
 	def test_sign_up_company(self):
 		resp = self.client.get('/sign_up_company');
 	def test_all_companies(self):
 		resp = self.client.get('/all_companies');
 		self.assertEqual(resp.status_code, 200);
+		self.assertTemplateUsed(resp, "all_companies.html");
 	
 	def test_pending(self):
 		resp = self.client.get('/pending');
 		self.assertEqual(resp.status_code, 200);
+		self.assertTemplateUsed(resp, "pending.html");
 	
 	def test_event(self):
 		resp = self.client.get('/event');
 		self.assertEqual(resp.status_code, 200);
+		self.assertTemplateUsed(resp, "events.html");
 	
 	def test_get_companies_json(self):
 		resp = self.client.get('/get_companies_json');
 	def test_about_us(self):
 		resp = self.client.get('/about_us');
 		self.assertEqual(resp.status_code, 200);
+		self.assertTemplateUsed(resp, "about_us.html");
 	
 	def test_contact_us(self):
 		resp = self.client.get('/contact_us');
 		self.assertEqual(resp.status_code, 200);
+		self.assertTemplateUsed(resp, "contact_us.html");
 	
 	def test_help(self):
 		resp = self.client.get('/help');
 		self.assertEqual(resp.status_code, 200);
+		self.assertTemplateUsed(resp, "help.html");
 	
 	def test_confirmation(self):
 		resp = self.client.get('/confirmation');
 		self.assertEqual(resp.status_code, 200);
+		self.assertTemplateUsed(resp, "confirmation.html");
 	
 	def test_mobileIndex(self):
-		resp = self.client.get('/mobile/');
+		resp = self.client.get('/mobile');
 		self.assertEqual(resp.status_code, 200);
-		
-	def test_confirmation(self):
-		resp = self.client.get('/random');
-		self.assertEqual(resp.status_code, 404);
+		self.assertTemplateUsed(resp, "mobile.html");
 
 class MyFuncTestCase(unittest.TestCase):
 	def testRSS(self):
 	# """
 	# test all the views functions
 	# """
+	
 	# def test_index(request):
 		# return direct_to_template(request, 'home.html', {'companies': companies, 'rss_info':getRss()} );
 

doc/doc/.doctrees/environment.pickle

Binary file modified.

doc/doc/.doctrees/index.doctree

Binary file modified.

doc/doc/_sources/index.txt

 Website
 =======
 
-http://ny-tech.appspot.com/
+* http://ny-tech.appspot.com/
 
 Repository Link
 ===============
 
-https://bitbucket.org/raja48/nytechmap
+* https://bitbucket.org/raja48/nytechmap
 
 Function Documentations
 =======================

doc/doc/index.html

 </div>
 <div class="section" id="website">
 <h1>Website<a class="headerlink" href="#website" title="Permalink to this headline">¶</a></h1>
-<p><a class="reference external" href="http://ny-tech.appspot.com/">http://ny-tech.appspot.com/</a></p>
+<ul class="simple">
+<li><a class="reference external" href="http://ny-tech.appspot.com/">http://ny-tech.appspot.com/</a></li>
+</ul>
 </div>
 <div class="section" id="repository-link">
 <h1>Repository Link<a class="headerlink" href="#repository-link" title="Permalink to this headline">¶</a></h1>
-<p><a class="reference external" href="https://bitbucket.org/raja48/nytechmap">https://bitbucket.org/raja48/nytechmap</a></p>
+<ul class="simple">
+<li><a class="reference external" href="https://bitbucket.org/raja48/nytechmap">https://bitbucket.org/raja48/nytechmap</a></li>
+</ul>
 </div>
 <div class="section" id="function-documentations">
 <h1>Function Documentations<a class="headerlink" href="#function-documentations" title="Permalink to this headline">¶</a></h1>

doc/doc/searchindex.js

-Search.setIndex({objects:{},terms:{all_compani:1,code:1,appspot:0,sign_up_form:1,show:0,raja:0,find_it:1,all:1,search_companies_json:1,sidebar:1,yet:1,paramet:1,redirect:1,onli:1,locat:0,billah:0,add:1,pend:1,els:1,team:0,masum:0,applic:1,"return":1,get:1,fals:1,approv:[0,1],twill:0,abdulhaq:0,httprespons:1,list:[0,1],pending_comp:1,eventpag:1,contain:1,where:1,page:[0,1],summari:1,pleas:1,companies_json:1,back:1,sign:[0,1],result:1,home:1,event:1,special:0,comp_id:1,index:[0,1],what:1,addr:1,lead:0,confirm:1,beautifulsoup:0,find:1,content:[],"new":0,httpresponseredirect:1,scrum:0,gener:1,javascript:1,york:0,repositori:0,address:1,put:1,org:0,sign_up:1,search:0,would:0,admin:[0,1],getrss:1,filter:1,place:0,all_companies_json:1,jiaqi:0,com:0,jack:1,first:0,softwar:0,render:1,onc:[0,1],modul:0,raja48:0,alreadi:1,done:1,owner:0,mobil:1,creat:[0,1],zip:1,zip_info:1,json:1,messag:1,websit:[0,1],yao:0,master:0,direct_to_templ:1,basic:1,type:1,"function":[0,1],form:1,tester:0,phone:1,user_input_zip:1,link:0,butt:[],jiang:0,compani:[0,1],"true":1,rss:1,info:0,none:1,arkadiusz:0,jqueri:0,limit:1,can:[0,1],were:1,mobile_index:1,html:[0,1],def:1,latitud:1,nytechmap:0,pin:1,certain:1,site:1,indic:[],search_by_zip:1,tabl:1,need:1,everi:1,serial:1,develop:0,welcom:0,rss_info:1,member:0,field:1,signupcompanyform:1,other:0,take:1,which:1,verifi:[0,1],document:[0,1],css:0,map:[0,1],product:0,sure:1,http:0,our:1,object:1,user:1,homepag:1,longitud:1,googl:1,bitbucket:0,"short":1,sphinx:0,center:1,nytm_pag:1,mimetyp:1,request:1,django:[0,1],leaflet:0,inform:[0,1],contact:1,tech:0,thi:1,enter:1,everyth:1,wisniewski:0},objtypes:{},titles:["Welcome to New York Tech Map&#8217;s documentation!","Functions Documentation"],objnames:{},filenames:["index","functions"]})
+Search.setIndex({objects:{},terms:{all_compani:1,code:1,appspot:0,sign_up_form:1,show:0,raja:0,find_it:1,all:1,search_companies_json:1,sidebar:1,yet:1,paramet:1,redirect:1,onli:1,locat:0,billah:0,add:1,pend:1,els:1,team:0,modul:0,applic:1,"return":1,get:1,fals:1,approv:[0,1],twill:0,abdulhaq:0,httprespons:1,list:[0,1],pending_comp:1,wisniewski:0,eventpag:1,contain:1,where:1,page:[0,1],summari:1,pleas:1,companies_json:1,back:1,sign:[0,1],result:1,home:1,event:1,special:0,comp_id:1,index:[0,1],what:1,addr:1,lead:0,confirm:1,beautifulsoup:0,find:1,content:[],"new":0,httpresponseredirect:1,object:1,gener:1,javascript:1,york:0,repositori:0,address:1,put:1,org:0,sign_up:1,search:0,zip:1,admin:[0,1],getrss:1,filter:1,place:0,all_companies_json:1,jiaqi:0,com:0,other:0,first:0,softwar:0,render:1,onc:[0,1],masum:0,raja48:0,alreadi:1,done:1,owner:0,mobil:1,pin:1,would:0,homepag:1,yao:0,messag:1,websit:[0,1],json:1,master:0,direct_to_templ:1,basic:1,type:1,"function":[0,1],form:1,tester:0,phone:1,user_input_zip:1,link:0,butt:[],sphinx:0,compani:[0,1],"true":1,rss:1,info:0,none:1,arkadiusz:0,jqueri:0,limit:1,can:[0,1],were:1,mobile_index:1,def:1,latitud:1,nytechmap:0,creat:[0,1],certain:1,site:1,indic:[],search_by_zip:1,tabl:1,need:1,everi:1,serial:1,develop:0,welcom:0,rss_info:1,member:0,field:1,signupcompanyform:1,html:[0,1],take:1,which:1,verifi:[0,1],document:[0,1],css:0,map:[0,1],product:0,sure:1,http:0,our:1,scrum:0,user:1,zip_info:1,longitud:1,googl:1,bitbucket:0,"short":1,jiang:0,center:1,nytm_pag:1,mimetyp:1,request:1,django:[0,1],leaflet:0,inform:[0,1],contact:1,tech:0,thi:1,enter:1,everyth:1,jack:1},objtypes:{},titles:["Welcome to New York Tech Map&#8217;s documentation!","Functions Documentation"],objnames:{},filenames:["index","functions"]})
 Website
 =======
 
-http://ny-tech.appspot.com/
+* http://ny-tech.appspot.com/
 
 Repository Link
 ===============
 
-https://bitbucket.org/raja48/nytechmap
+* https://bitbucket.org/raja48/nytechmap
 
 Function Documentations
 =======================