Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix for random unit tests failing

  • Loading branch information...
commit dc3de8e90dbfb2881c516f5fa84c21ae7c5e8c25 1 parent d7d3cea
Prajwal Tuladhar authored April 29, 2012

Showing 1 changed file with 8 additions and 9 deletions. Show diff stats Hide diff stats

  1. 17  test/test_sailthru_util.coffee
17  test/test_sailthru_util.coffee
@@ -91,24 +91,23 @@ exports.testGetSignatureHash = (test) ->
91 91
     test.done()
92 92
 
93 93
 exports.testMd5 = (test) ->
94  
-    test.expect 1
  94
+    test.expect 2
95 95
     data1 = 'simple_text'
96 96
     hash1 = SailthruUtil.md5 data1
97 97
     cmd1 = "python -c 'import hashlib; print hashlib.md5(\"" + data1 + "\").hexdigest()'"
98 98
     
99 99
     exec1 = exec cmd1, (error, stdout, stderr) ->
100 100
         test.equal stdout.trim(), hash1
101  
-        #test.done()
102 101
     
103  
-    data2 = "नमस्ते विश्व"
104  
-    hash2 = SailthruUtil.md5 data2
  102
+        data2 = "नमस्ते विश्व"
  103
+        hash2 = SailthruUtil.md5 data2
105 104
 
106  
-    cmd2 = "python -c 'import hashlib; print hashlib.md5(\"" + data2 + "\").hexdigest()'"
  105
+        cmd2 = "python -c 'import hashlib; print hashlib.md5(\"" + data2 + "\").hexdigest()'"
107 106
     
108  
-    exec2 = exec cmd2, (error, stdout, stderr) ->
109  
-        test.equal stdout.trim(), hash2
  107
+        exec2 = exec cmd2, (error, stdout, stderr) ->
  108
+            test.equal stdout.trim(), hash2
110 109
     
111  
-    exec2.on 'exit', (code) ->
112  
-        test.done()
  110
+        exec2.on 'exit', (code) ->
  111
+            test.done()
113 112
 
114 113
 

0 notes on commit dc3de8e

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