[Zope-CVS] CVS: Packages/JobBoardEx/tests - testJob.py:1.5

Guido van Rossum guido@python.org
Wed, 20 Mar 2002 15:02:06 -0500


Update of /cvs-repository/Packages/JobBoardEx/tests
In directory cvs.zope.org:/tmp/cvs-serv29518/tests

Modified Files:
	testJob.py 
Log Message:
Get rid of the distinction between contactURL and contactEmail.  It's
just 'contact' now.


=== Packages/JobBoardEx/tests/testJob.py 1.4 => 1.5 ===
 
     def setUp(self):
-        self.job = Job("submitter", "summary", "description",
-                       "contactURL", "contactEmail")
+        self.job = Job("submitter", "summary", "description", "contact")
 
     def test_initialization(self):
         job = self.job
@@ -19,8 +18,7 @@
         self.assertEqual(job.submitter, 'submitter')
         self.assertEqual(job.summary, 'summary')
         self.assertEqual(job.description, 'description')
-        self.assertEqual(job.contactURL, 'contactURL')
-        self.assertEqual(job.contactEmail, 'contactEmail')
+        self.assertEqual(job.contact, 'contact')
         self.assertEqual(job.state, JobState.PendingApproval)
 
     def test_states(self):
@@ -31,12 +29,10 @@
         job = self.job
         job.id = "foo"
         self.assertEqual(job.id, "foo")
-        try:
-            job.id = "splat"
-        except ValueError:
-            self.assertEqual(job.id, "foo")
-        else:
-            self.fail("expected id not to be changeable")
+        job.id = "bar"
+        self.assertEqual(job.id, "bar")
+        job.id = None
+        self.assertEqual(job.id, None)
 
 
 def test_suite():