[389-commits] Branch '389-ds-base-1.3.3' - dirsrvtests/tickets

Mark Reynolds mreynolds at fedoraproject.org
Thu May 21 19:53:52 UTC 2015


 dirsrvtests/tickets/ticket47553_rdn_write_test.py |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 9ba030fb4525523f177498fe5d558a5ac86b096f
Author: Mark Reynolds <mreynolds at redhat.com>
Date:   Thu May 21 15:49:21 2015 -0400

    Ticket 47753 - Fix testecase
    
    Description:  The pytest fixture was commented out, which broke the test
                  when using py.test.
    
    https://fedorahosted.org/389/ticket/47753
    
    Reviewed by: mreynolds
    
    (cherry picked from commit 513393bf2ddc492413bbb6a8f061f45b1c0dc57b)

diff --git a/dirsrvtests/tickets/ticket47553_rdn_write_test.py b/dirsrvtests/tickets/ticket47553_rdn_write_test.py
index f15d9b3..826e709 100644
--- a/dirsrvtests/tickets/ticket47553_rdn_write_test.py
+++ b/dirsrvtests/tickets/ticket47553_rdn_write_test.py
@@ -24,13 +24,14 @@ DST_ENTRY_CN = SRC_ENTRY_CN + EXT_RDN
 SRC_ENTRY_DN = "cn=%s,%s" % (SRC_ENTRY_CN, SUFFIX)
 DST_ENTRY_DN = "cn=%s,%s" % (DST_ENTRY_CN, SUFFIX)
 
+
 class TopologyStandalone(object):
     def __init__(self, standalone):
         standalone.open()
         self.standalone = standalone
 
 
-#@pytest.fixture(scope="module")
+ at pytest.fixture(scope="module")
 def topology(request):
     global installation1_prefix
 
@@ -55,6 +56,7 @@ def topology(request):
 
     return TopologyStandalone(standalone)
 
+
 def test_ticket47553_rdn_write_init(topology):
     topology.standalone.log.info("\n\n######################### Add entry tuser ######################\n")
     topology.standalone.add_s(Entry((SRC_ENTRY_DN, {
@@ -62,6 +64,7 @@ def test_ticket47553_rdn_write_init(topology):
                                                 'sn': SRC_ENTRY_CN,
                                                 'cn': SRC_ENTRY_CN})))
 
+
 def test_ticket47553_rdn_write_get_ger(topology):
     ANONYMOUS_DN = ""
     topology.standalone.log.info("\n\n######################### GER rights for anonymous ######################\n")
@@ -75,6 +78,7 @@ def test_ticket47553_rdn_write_get_ger(topology):
             topology.standalone.log.info("###############  entryLevelRights: %r" % value)
             assert 'n' not in value
 
+
 def test_ticket47553_rdn_write_modrdn_anonymous(topology):
     ANONYMOUS_DN = ""
     topology.standalone.close()
@@ -82,13 +86,11 @@ def test_ticket47553_rdn_write_modrdn_anonymous(topology):
     topology.standalone.open()
     msg_id = topology.standalone.search_ext("", ldap.SCOPE_BASE, "objectclass=*")
     rtype, rdata, rmsgid, response_ctrl = topology.standalone.result3(msg_id)
-    value = ''
     for dn, attrs in rdata:
         topology.standalone.log.info("dn: %s" % dn)
         for attr in attrs:
             topology.standalone.log.info("###############  %r: %r" % (attr, attrs[attr]))
 
-
     try:
         topology.standalone.rename_s(SRC_ENTRY_DN, "cn=%s" % DST_ENTRY_CN, delold=True)
     except Exception as e:
@@ -102,6 +104,7 @@ def test_ticket47553_rdn_write_modrdn_anonymous(topology):
         topology.standalone.log.info("The entry was not renamed (expected)")
         isinstance(e, ldap.NO_SUCH_OBJECT)
 
+
 def test_ticket47553_rdn_write(topology):
     '''
     Write your testcase here...




More information about the 389-commits mailing list