summaryrefslogtreecommitdiff
path: root/source4/dsdb/tests/python/urgent_replication.py
AgeCommit message (Collapse)AuthorFilesLines
2023-01-30python: Replace calls to deprecated methodsJoseph Sutton1-10/+10
These aliases are deprecated and have been removed in Python 3.12. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-04-28python: remove all 'from __future__ import print_function'Douglas Bagnall1-1/+0
This made Python 2's print behave like Python 3's print(). In some cases, where we had: from __future__ import print_function """Intended module documentation...""" this will have the side effect of making the intended module documentation work as the actual module documentation (i.e. becoming __doc__), because it is once again the first statement in the module. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-02-07pytests: heed assertEquals deprecation warning en-masseDouglas Bagnall1-16/+16
TestCase.assertEquals() is an alias for TestCase.assertEqual() and has been deprecated since Python 2.7. When we run our tests with in python developer mode (`PYTHONDEVMODE=1 make test`) we get 580 DeprecationWarnings about this. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
2018-12-14PY3: change shebang to python3 in source4/dsdb dirJoe Guo1-1/+1
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
2018-08-24PEP8: fix W291: trailing whitespaceJoe Guo1-2/+2
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E303: too many blank lines (2)Joe Guo1-1/+0
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E231: missing whitespace after ','Joe Guo1-19/+19
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E226: missing whitespace around arithmetic operatorJoe Guo1-1/+1
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E225: missing whitespace around operatorJoe Guo1-1/+1
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E131: continuation line unaligned for hanging indentJoe Guo1-10/+10
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E128: continuation line under-indented for visual indentJoe Guo1-11/+11
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-03-23s3/dsdb: convert print func to be py2/py3 compatibleNoel Power1-2/+3
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-02-28dsdb python tests: convert 'except X, (tuple)' to 'except X as e'Noel Power1-1/+2
In addition to converting the except line another line is also added for each except to extract the tuple contents. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-06-27s4:dsdb/tests: use more useful userAccountControl/pwdLastSet values in the ↵Stefan Metzmacher1-2/+2
urgent_replication test Using UF_SMARDCARD_REQUIRED has some side effects, so we better use UF_DONT_EXPIRE_PASSWD which doesn't trigger additional actions. Setting pwdLastSet to "1" is not allowed, only "-1" is able to change an existing value of "0". BUG: https://bugzilla.samba.org/show_bug.cgi?id=9654 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-06-06Remove the try/catch from urgent_replication.pyAndrew Bartlett1-9/+5
This meant that for ages, the duplicate OID was unnoticed, and when the syntax was corrected recently, this caused the test to run, and so cause trouble Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz
2016-06-06selftest: Use random OIDs from under the Samba OID arcAndrew Bartlett1-2/+3
The urgent_replication.py test used the OID of uid, and this caused other tests to fail The other random OIDs should have been from under our arc, not under iso.member-body.us We split up the range a little to avoid some of the birthday paradox, in the tests that create multiple OIDs. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz
2016-02-17s4:dsdb/tests: don't use spaces in lDAPDisplayName in urgent_replication.pyStefan Metzmacher1-4/+4
This should result in LDAP_UNWILLING_TO_PERFORM/WERR_DS_INVALID_LDAP_DISPLAY_NAME, so better use a useful value without spaces. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-11-24Use samba.tests.subunitrun in urgent replication test.Jelmer Vernooij1-13/+4
Change-Id: I3e7a32876d557ac376326ab75e851298e874d584 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-14urgent_replication: Use subunit reporting, remove allow_empty_output.Jelmer Vernooij1-72/+44
Change-Id: I6d479b218eff6c4292fbb99e4760bbd62ce1f380 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2011-09-19pyldb: fixed places where we try to concatenate a Dn with a stringAndrew Tridgell1-1/+1
you need to either use str(dn) or use %s in a format string
2011-09-19s4-dsdb: use get_config_basedn() in python testsAndrew Tridgell1-1/+1
we can't just append CN=Configuration to the basedn, as that won't give the right configuration DN for a subdomain of a forest Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-02s4-python Ensure we add the Samba python path first.Andrew Bartlett1-1/+1
This exact form of the construction is important, and we match on it in the installation scripts. Andrew Bartlett
2011-01-14s4:urgent_replication.py - remove a now superflous RELAX controlMatthias Dieter Wallnöfer1-1/+1
The LSA object creation protection changed to the trusted/untrusted connection model. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Fri Jan 14 19:30:52 CET 2011 on sn-devel-104
2011-01-06Remove unused imports.Jelmer Vernooij1-1/+1
2010-12-15s4-dsdb/tests/python: Explicitly pass comamnd line LoadParm() instance to ↵Kamen Mazdrashki1-1/+1
system_session() Otherwise system_session() creates a LoadParm() instance which resets certain global parameters to their defaults from smb.conf ("log level" for instance) Autobuild-User: Kamen Mazdrashki <kamenim@samba.org> Autobuild-Date: Wed Dec 15 15:10:47 CET 2010 on sn-devel-104
2010-11-18s4:dsdb python tests - use "ldb.domain_dn"Matthias Dieter Wallnöfer1-7/+1
By inspiration of Nadya's patches
2010-11-11s4:python tests - fix script names in the help textMatthias Dieter Wallnöfer1-1/+1
2010-11-04s4-dsdb Fix urgent_replication test not to set an invalid userAccountControlAndrew Bartlett1-2/+3
A userAccountControl value of 0 or 1 is invalid, you must include one of the account types. Andrew Bartlett
2010-11-04urgent_replication: Fix syntax error.Jelmer Vernooij1-1/+1
2010-11-03urgent_replication: Fix formattingJelmer Vernooij1-33/+33
2010-11-03pydsdb: Import testtools before subunit for those that don't haveJelmer Vernooij1-1/+1
testtools installed. Also, cleanup some imports. Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Wed Nov 3 17:47:55 UTC 2010 on sn-devel-104
2010-10-03s4:urgent_replication.py - fix up the system flags handlingMatthias Dieter Wallnöfer1-4/+3
And relax some more object creations due to the enforced system flags rules.
2010-08-07s4:urgent_replication.py - relax also here the add of a secrets objectMatthias Dieter Wallnöfer1-2/+1
2010-08-01s4:urgent_replication.py test - adapt the test for the harder delete ↵Matthias Dieter Wallnöfer1-1/+1
restrictions Otherwise we are not able to delete the "test crossRef" object which points to the default NC anymore.
2010-07-03s4:urgent_replication.py test - remove unneeded "relax" control parametersMatthias Dieter Wallnöfer1-2/+2
2010-06-30s4:dsdb: move dsdb python tests from lib/ldb/ to dsdb/Stefan Metzmacher1-0/+386
metze