[Zope3-checkins] CVS: Zope3/src/zope/app/http/tests - test_delete.py:1.6 test_put.py:1.5
Sidnei da Silva
sidnei@x3ng.com.br
Mon, 23 Jun 2003 13:17:36 -0400
Update of /cvs-repository/Zope3/src/zope/app/http/tests
In directory cvs.zope.org:/tmp/cvs-serv14183/src/zope/app/http/tests
Modified Files:
test_delete.py test_put.py
Log Message:
1. Whitespace cleanup. 2. Docstring fixing. 3. Modified DAV code and tests to append '/' to the path if the last element is 'dir-like'. 4. Support for MKCOL with tests + functional tests. 5. Refactored DAV functional tests into a base class for reusing
=== Zope3/src/zope/app/http/tests/test_delete.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/http/tests/test_delete.py:1.5 Fri Jun 6 16:55:09 2003
+++ Zope3/src/zope/app/http/tests/test_delete.py Mon Jun 23 13:17:05 2003
@@ -42,9 +42,9 @@
request = TestRequest()
delete = zope.app.http.delete.DELETE(item, request)
- self.assert_(hasattr(container, 'a'))
+ self.assert_(hasattr(container, 'a'))
self.assertEqual(delete.DELETE(), '')
- self.assert_(not hasattr(container, 'a'))
+ self.assert_(not hasattr(container, 'a'))
def test_suite():
return TestSuite((
=== Zope3/src/zope/app/http/tests/test_put.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/http/tests/test_put.py:1.4 Fri Jun 6 16:55:09 2003
+++ Zope3/src/zope/app/http/tests/test_put.py Mon Jun 23 13:17:05 2003
@@ -46,7 +46,7 @@
def __call__(self, name, content_type, data):
return File(name, content_type, data)
-
+
class TestNullPUT(PlacelessSetup, TestCase):
@@ -66,7 +66,7 @@
self.assertEqual(file.__class__, File)
self.assertEqual(file.name, 'spam')
self.assertEqual(file.content_type, 'test/foo')
- self.assertEqual(file.data, content)
+ self.assertEqual(file.data, content)
# Check HTTP Response
self.assertEqual(request.response.getStatus(), 201)
@@ -100,7 +100,7 @@
put = zope.app.http.put.FilePUT(file, request)
self.assertEqual(put.PUT(), '')
request.response.setBody('')
- self.assertEqual(file.data, content)
+ self.assertEqual(file.data, content)
def test_bad_content_header(self):
file = File("thefile", "text/x", "initial content")
@@ -113,7 +113,7 @@
put = zope.app.http.put.FilePUT(file, request)
self.assertEqual(put.PUT(), '')
request.response.setBody('')
- self.assertEqual(file.data, "initial content")
+ self.assertEqual(file.data, "initial content")
# Check HTTP Response
self.assertEqual(request.response.getStatus(), 501)