[Checkins] SVN: zope.app.server/trunk/ Remove test_zpasswd.py, it was moved to zope.password. Bump version to 3.6.0dev

Gediminas Paulauskas menesis at pov.lt
Fri Mar 18 12:02:32 EDT 2011


Log message for revision 121038:
  Remove test_zpasswd.py, it was moved to zope.password. Bump version to 3.6.0dev
  

Changed:
  U   zope.app.server/trunk/CHANGES.txt
  U   zope.app.server/trunk/setup.py
  D   zope.app.server/trunk/src/zope/app/server/tests/test_zpasswd.py

-=-
Modified: zope.app.server/trunk/CHANGES.txt
===================================================================
--- zope.app.server/trunk/CHANGES.txt	2011-03-18 15:52:35 UTC (rev 121037)
+++ zope.app.server/trunk/CHANGES.txt	2011-03-18 16:02:31 UTC (rev 121038)
@@ -2,15 +2,12 @@
 CHANGES
 =======
 
-3.5.1 (Unreleased)
+3.6.0 (unreleased)
 ------------------
 
-- Let ``zope.app.server`` comply to zope.org repository policy.
+- Moved ``zope.app.server.zpasswd`` to ``zope.password.zpasswd``.
 
-- Moved ``zope.app.server.zpasswd`` to ``zope.password.zpasswd``. A
-  deprecation warning is raised when import ``zpasswd``.
 
-
 3.5.0 (2009-12-19)
 ------------------
 

Modified: zope.app.server/trunk/setup.py
===================================================================
--- zope.app.server/trunk/setup.py	2011-03-18 15:52:35 UTC (rev 121037)
+++ zope.app.server/trunk/setup.py	2011-03-18 16:02:31 UTC (rev 121038)
@@ -17,8 +17,6 @@
 # Zope Toolkit policies as described by this documentation.
 ##############################################################################
 """Setup for zope.app.server package
-
-$Id$
 """
 import os
 from setuptools import setup, find_packages
@@ -27,7 +25,7 @@
     return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
 
 setup(name='zope.app.server',
-      version = '3.5.1dev',
+      version = '3.6.0dev',
       author='Zope Corporation and Contributors',
       author_email='zope-dev at zope.org',
       description='ZServer integration for Zope 3 Applications',

Deleted: zope.app.server/trunk/src/zope/app/server/tests/test_zpasswd.py
===================================================================
--- zope.app.server/trunk/src/zope/app/server/tests/test_zpasswd.py	2011-03-18 15:52:35 UTC (rev 121037)
+++ zope.app.server/trunk/src/zope/app/server/tests/test_zpasswd.py	2011-03-18 16:02:31 UTC (rev 121038)
@@ -1,139 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2004 Zope Foundation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""Tests for the zpasswd script.
-
-$Id$
-"""
-
-import os
-import unittest, doctest
-
-from zope.password import password
-from zope.app.server.tests.test_mkzopeinstance import TestBase
-
-from zope.app.server import zpasswd
-
-
-class ArgumentParsingTestCase(TestBase):
-
-    config = os.path.join(os.path.dirname(__file__), "site.zcml")
-
-    def parse_args(self, args):
-        argv = ["foo/bar.py"] + args
-        options = zpasswd.parse_args(argv)
-        self.assertEqual(options.program, "bar.py")
-        self.assert_(options.version)
-        return options
-
-    def check_stdout_content(self, args):
-        try:
-            options = self.parse_args(args)
-        except SystemExit, e:
-            self.assertEqual(e.code, 0)
-            self.assert_(self.stdout.getvalue())
-            self.failIf(self.stderr.getvalue())
-        else:
-            self.fail("expected SystemExit")
-
-    def test_no_arguments(self):
-        options = self.parse_args([])
-        self.assert_(options.managers)
-        self.assert_(not options.destination)
-
-    def test_version_long(self):
-        self.check_stdout_content(["--version"])
-
-    def test_help_long(self):
-        self.check_stdout_content(["--help"])
-
-    def test_help_short(self):
-        self.check_stdout_content(["-h"])
-
-    def test_destination_short(self):
-        options = self.parse_args(["-o", "filename"])
-        self.assertEqual(options.destination, "filename")
-
-    def test_destination_long(self):
-        options = self.parse_args(["--output", "filename"])
-        self.assertEqual(options.destination, "filename")
-
-    def test_config_short(self):
-        options = self.parse_args(["-c", self.config])
-        self.assert_(options.managers)
-
-    def test_config_long(self):
-        options = self.parse_args(["--config", self.config])
-        self.assert_(options.managers)
-
-class ControlledInputApplication(zpasswd.Application):
-
-    def __init__(self, options, input_lines):
-        super(ControlledInputApplication, self).__init__(options)
-        self.__input = input_lines
-
-    def read_input_line(self, prompt):
-        return self.__input.pop(0)
-
-    read_password = read_input_line
-
-    def all_input_consumed(self):
-        return not self.__input
-
-class Options(object):
-
-    config = None
-    destination = None
-    version = "[test-version]"
-    program = "[test-program]"
-    managers = password.managers
-
-class InputCollectionTestCase(TestBase):
-
-    def createOptions(self):
-        return Options()
-
-    def check_principal(self, expected):
-        output = self.stdout.getvalue()
-        self.failUnless(output)
-
-        principal_lines = output.splitlines()[-(len(expected) + 1):-1]
-        for line, expline in zip(principal_lines, expected):
-            self.failUnlessEqual(line.strip(), expline)
-
-    def test_principal_information(self):
-        options = self.createOptions()
-        app = ControlledInputApplication(options,
-            ["id", "title", "login", "1", "passwd", "passwd", "description"])
-        app.process()
-        self.failUnless(not self.stderr.getvalue())
-        self.failUnless(app.all_input_consumed())
-        self.check_principal([
-            '<principal',
-            'id="id"',
-            'title="title"',
-            'login="login"',
-            'password="passwd"',
-            'description="description"',
-            '/>'
-            ])
-
-
-def test_suite():
-    suite = doctest.DocTestSuite('zope.app.server.zpasswd')
-    suite.addTest(unittest.makeSuite(ArgumentParsingTestCase))
-    suite.addTest(unittest.makeSuite(InputCollectionTestCase))
-    return suite
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')



More information about the checkins mailing list