Commits

Marko Mrdjenovic committed 8952384 Merge

Merge

Comments (0)

Files changed (27)

 python-memcached = 1.47
 sunburnt = 0.6
 mr.developer = 1.22
-psycopg2 = 2.4.5
+psycopg2 = 2.4.1
 djangorecipe = 1.3
-haystack = 0.15
+django-haystack = 1.2.7

delajozate/dz/static/img/poslanci/small/aleksander-ravnikar.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/alenka-bratusek.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/anton-rop2.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/boris-sovic.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/borut-ambrozic2.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/ivo-vajgl.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/janez-cimperman.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/janez-drnovsek.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/katarina-kresal.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/lejla-hercegovac2.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/marjana-kotnik-poropat2.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/masa-kociper2.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/mihael-brejc.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/mihael-prevc2.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/milan-zver.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/mojca-prelesnik.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/peter-vilfan.jpg

Old
Old image
New
New image

delajozate/dz/static/img/poslanci/small/richard-beuermann.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/roman-jakic2.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/stanko-stepisnik2.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/tamara-vonta2.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/tina-komel2.jpg

Added
New image

delajozate/dz/static/img/poslanci/small/zoran-thaler.jpg

Added
New image

delajozate/dz/tests.py

-"""
-This file demonstrates writing tests using the unittest module. These will pass
-when you run "manage.py test".
 
-Replace this with more appropriate tests for your application.
-"""
+import unittest
+import os
 
-from django.test import TestCase
+from django.test import Client, TestCase
 
-
-class SimpleTest(TestCase):
-    def test_basic_addition(self):
-        """
-        Tests that 1 + 1 always equals 2.
-        """
-        self.assertEqual(1 + 1, 2)
+class DZTest(TestCase):
+    fixtures = [
+        os.path.join(os.path.dirname(__file__), '../fixtures/delajozate.json')
+        ]
+    def setUp(self):
+        self.c = Client()
+    
+    def test_responses(self):
+        resp = self.c.get('/')
+        self.assertEqual(resp.status_code, 200)
+        
+        resp = self.c.get('/poslanci/')
+        self.assertEqual(resp.status_code, 301)
+        
+        resp = self.c.get('/poslanci/danes/')
+        self.assertEqual(resp.status_code, 200)
+        
+        resp = self.c.get('/poslanci/3-mandat/')
+        self.assertEqual(resp.status_code, 200)
+        
+        resp = self.c.get('/osebe/borut-ambrozic/')
+        self.assertEqual(resp.status_code, 200)
+        
+        resp = self.c.get('/seje/')
+        self.assertEqual(resp.status_code, 200)
+        
+        resp = self.c.get('/iskanje/')
+        self.assertEqual(resp.status_code, 200)
+        
+        resp = self.c.get('/robots.txt')
+        self.assertEqual(resp.status_code, 200)
+        

delajozate/fixtures/delajozate.json

             "vir_slike": "www.vlada.si", 
             "slug": "janez-drnovsek", 
             "priimek": "Drnov\u0161ek", 
-            "slika": ""
+            "slika": "/static/img/poslanci/small/janez-drnovsek.jpg"
         }
     }, 
     {
             "vir_slike": "www.europarl.europa.eu", 
             "slug": "zoran-thaler", 
             "priimek": "Thaler", 
-            "slika": ""
+            "slika": "/static/img/poslanci/small/zoran-thaler.jpg"
         }
     }, 
     {
             "vir_slike": "www.vrhnika.si", 
             "slug": "richard-beuermann", 
             "priimek": "Beuermann", 
-            "slika": ""
+            "slika": "/static/img/poslanci/small/richard-beuermann.jpg"
         }
     }, 
     {
             "vir_slike": "www.obcina-ig.si", 
             "slug": "janez-cimperman", 
             "priimek": "Cimperman", 
-            "slika": ""
+            "slika": "/static/img/poslanci/small/janez-cimperman.jpg"
         }
     }, 
     {
             "vir_slike": "www.socialnidemokrati.si/", 
             "slug": "boris-sovic", 
             "priimek": "Sovi\u010d", 
-            "slika": ""
+            "slika": "/static/img/poslanci/small/boris-sovic.jpg"
         }
     }, 
     {
             "vir_slike": "http://www.flickr.com/photos/eppofficial/4408565710/", 
             "slug": "mihael-brejc", 
             "priimek": "Brejc", 
-            "slika": ""
+            "slika": "/static/img/poslanci/small/mihael-brejc.jpg"
         }
     }, 
     {
             "vir_slike": "", 
             "slug": "milan-zver", 
             "priimek": "Zver", 
-            "slika": ""
+            "slika": "/static/img/poslanci/small/milan-zver.jpg"
         }
     }, 
     {
             "vir_slike": "", 
             "slug": "aleksander-ravnikar", 
             "priimek": "Ravnikar", 
-            "slika": ""
+            "slika": "/static/img/poslanci/small/aleksander-ravnikar.jpg"
         }
     }, 
     {
             "vir_slike": "", 
             "slug": "ivo-vajgl", 
             "priimek": "Vajgl", 
-            "slika": ""
+            "slika": "/static/img/poslanci/small/ivo-vajgl.jpg"
         }
     }, 
     {
             "vir_slike": "", 
             "slug": "katarina-kresal", 
             "priimek": "Kresal", 
-            "slika": ""
+            "slika": "/static/img/poslanci/small/katarina-kresal.jpg"
         }
     }, 
     {
             "vir_slike": "", 
             "slug": "mojca-prelesnik", 
             "priimek": "Prelesnik", 
-            "slika": ""
+            "slika": "/static/img/poslanci/small/mojca-prelesnik.jpg"
         }
     }, 
     {
     'pysolr',
     'python-dateutil',
     'django-debug-toolbar',
+    'django-haystack',
 ]
 
 if sys.platform != "darwin":