Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

tests fail

  • Loading branch information...
commit 04621849d1c2464929cfd0fa99cfdac5702de3cf 1 parent 9251041
andreysobol authored February 29, 2012

Showing 1 changed file with 17 additions and 0 deletions. Show diff stats Hide diff stats

  1. 17  testsobol/mainapp/tests.py
17  testsobol/mainapp/tests.py
@@ -4,7 +4,9 @@
4 4
 
5 5
 Replace this with more appropriate tests for your application.
6 6
 """
  7
+import os
7 8
 from datetime import datetime, timedelta
  9
+from subprocess import Popen, PIPE
8 10
 
9 11
 from django.test import TestCase
10 12
 from django.forms.models import model_to_dict
@@ -110,3 +112,18 @@ def test(self):
110 112
 
111 113
         page = self.client.get('/')
112 114
         self.assertTrue(page.content.find('<a href="/admin/auth/user/1/"') != -1 )
  115
+
  116
+
  117
+class Command(TestCase):
  118
+
  119
+    def test(self):
  120
+        p = Popen("python manage.py printmodels", stdout=PIPE, stderr=PIPE, shell=True).stdout.read()
  121
+        self.assertTrue(p.find('Bio')!=-1)
  122
+        Popen("bash save.bash", stdout=PIPE, stderr=PIPE, shell=True)
  123
+        l = os.listdir(".")
  124
+        for d in l:
  125
+            if d.find('.dat')!=-1:
  126
+                f = open(d,'r')
  127
+                self.assertTrue((f.read()).find('error') != -1)
  128
+                f.close()
  129
+                Popen("rm " + d, stdout=PIPE, stderr=PIPE, shell=True)

0 notes on commit 0462184

Please sign in to comment.
Something went wrong with that request. Please try again.