gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] storm/org/nongnu/storm BlockId.test


From: Tuukka Hastrup
Subject: [Gzz-commits] storm/org/nongnu/storm BlockId.test
Date: Fri, 25 Apr 2003 09:00:14 -0400

CVSROOT:        /cvsroot/storm
Module name:    storm
Changes by:     Tuukka Hastrup <address@hidden> 03/04/25 09:00:14

Modified files:
        org/nongnu/storm: BlockId.test 

Log message:
        refactored content type test

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/storm/storm/org/nongnu/storm/BlockId.test.diff?tr1=1.11&tr2=1.12&r1=text&r2=text

Patches:
Index: storm/org/nongnu/storm/BlockId.test
diff -u storm/org/nongnu/storm/BlockId.test:1.11 
storm/org/nongnu/storm/BlockId.test:1.12
--- storm/org/nongnu/storm/BlockId.test:1.11    Fri Apr 25 08:46:34 2003
+++ storm/org/nongnu/storm/BlockId.test Fri Apr 25 09:00:14 2003
@@ -90,29 +90,19 @@
 def testContentType():
     """Malformed content types must throw exceptions"""
 
-    BlockId(contenttest % 'text/html')
-    BlockId(contenttest % 'a/a')
-    BlockId(contenttest % 'x/x')
+    for ct in ['text/html', 
+               'a/a', 
+               'x/x']:
+        BlockId(contenttest % ct)
 
-    try: BlockId(contenttest % '/html')
-    except java.lang.IllegalArgumentException: pass
-    else: assert 0
-
-    try: BlockId(contenttest % 'text/')
-    except java.lang.IllegalArgumentException: pass
-    else: assert 0
-
-    try: BlockId(contenttest % '/')
-    except java.lang.IllegalArgumentException: pass
-    else: assert 0
-
-    try: BlockId(contenttest % 'text/html/myextension')
-    except java.lang.IllegalArgumentException: pass
-    else: assert 0
-
-    try: BlockId(contenttest % 'mytype')
-    except java.lang.IllegalArgumentException: pass
-    else: assert 0
+    for ct in ['/html', 
+               'text/', 
+               '/',
+               'text/html/myextension',
+               'mytype']:
+        try: BlockId(contenttest % ct)
+        except java.lang.IllegalArgumentException: pass
+        else: assert 0
 
 
 def testSpaces():




reply via email to

[Prev in Thread] Current Thread [Next in Thread]