[PATCH 17/17] Add support for finding extras/mimeparse in old style Python tests.

Jelmer Vernooij jelmer at samba.org
Sat Nov 1 13:22:09 MDT 2014


Eventually these tests should be converted to "real" Python unit tests,
making these hacks unnecessary.

Change-Id: Id760285a38250830dd7d4f948db602d00cabcb6f
Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
---
 source4/dsdb/tests/python/dirsync.py            | 2 ++
 source4/dsdb/tests/python/ldap.py               | 2 ++
 source4/dsdb/tests/python/ldap_schema.py        | 2 ++
 source4/dsdb/tests/python/sam.py                | 2 ++
 source4/dsdb/tests/python/sites.py              | 2 ++
 source4/dsdb/tests/python/token_group.py        | 2 ++
 source4/dsdb/tests/python/urgent_replication.py | 2 ++
 7 files changed, 14 insertions(+)

diff --git a/source4/dsdb/tests/python/dirsync.py b/source4/dsdb/tests/python/dirsync.py
index f36a3c0..05bbb8c 100755
--- a/source4/dsdb/tests/python/dirsync.py
+++ b/source4/dsdb/tests/python/dirsync.py
@@ -22,6 +22,8 @@ import optparse
 import sys
 sys.path.insert(0, "bin/python")
 import samba
+samba.ensure_external_module("mimeparse", "mimeparse")
+samba.ensure_external_module("extras", "extras")
 samba.ensure_external_module("testtools", "testtools")
 samba.ensure_external_module("subunit", "subunit/python")
 
diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py
index f6b08e4..0373985 100755
--- a/source4/dsdb/tests/python/ldap.py
+++ b/source4/dsdb/tests/python/ldap.py
@@ -10,6 +10,8 @@ import os
 
 sys.path.insert(0, "bin/python")
 import samba
+samba.ensure_external_module("mimeparse", "mimeparse")
+samba.ensure_external_module("extras", "extras")
 samba.ensure_external_module("testtools", "testtools")
 samba.ensure_external_module("subunit", "subunit/python")
 
diff --git a/source4/dsdb/tests/python/ldap_schema.py b/source4/dsdb/tests/python/ldap_schema.py
index fb0ef9c..77e8bf1 100755
--- a/source4/dsdb/tests/python/ldap_schema.py
+++ b/source4/dsdb/tests/python/ldap_schema.py
@@ -10,6 +10,8 @@ import os
 
 sys.path.insert(0, "bin/python")
 import samba
+samba.ensure_external_module("mimeparse", "mimeparse")
+samba.ensure_external_module("extras", "extras")
 samba.ensure_external_module("testtools", "testtools")
 samba.ensure_external_module("subunit", "subunit/python")
 
diff --git a/source4/dsdb/tests/python/sam.py b/source4/dsdb/tests/python/sam.py
index 804905b..c8d1c7d 100755
--- a/source4/dsdb/tests/python/sam.py
+++ b/source4/dsdb/tests/python/sam.py
@@ -8,6 +8,8 @@ import os
 
 sys.path.insert(0, "bin/python")
 import samba
+samba.ensure_external_module("mimeparse", "mimeparse")
+samba.ensure_external_module("extras", "extras")
 samba.ensure_external_module("testtools", "testtools")
 samba.ensure_external_module("subunit", "subunit/python")
 
diff --git a/source4/dsdb/tests/python/sites.py b/source4/dsdb/tests/python/sites.py
index 8b984b2..80ca3e7 100755
--- a/source4/dsdb/tests/python/sites.py
+++ b/source4/dsdb/tests/python/sites.py
@@ -22,6 +22,8 @@ import optparse
 import sys
 sys.path.insert(0, "bin/python")
 import samba
+samba.ensure_external_module("mimeparse", "mimeparse")
+samba.ensure_external_module("extras", "extras")
 samba.ensure_external_module("testtools", "testtools")
 samba.ensure_external_module("subunit", "subunit/python")
 
diff --git a/source4/dsdb/tests/python/token_group.py b/source4/dsdb/tests/python/token_group.py
index ff9f3ec..04da97c 100755
--- a/source4/dsdb/tests/python/token_group.py
+++ b/source4/dsdb/tests/python/token_group.py
@@ -8,6 +8,8 @@ import os
 
 sys.path.insert(0, "bin/python")
 import samba
+samba.ensure_external_module("mimeparse", "mimeparse")
+samba.ensure_external_module("extras", "extras")
 samba.ensure_external_module("testtools", "testtools")
 samba.ensure_external_module("subunit", "subunit/python")
 
diff --git a/source4/dsdb/tests/python/urgent_replication.py b/source4/dsdb/tests/python/urgent_replication.py
index 8083ce4..e9d3f4b 100755
--- a/source4/dsdb/tests/python/urgent_replication.py
+++ b/source4/dsdb/tests/python/urgent_replication.py
@@ -5,6 +5,8 @@ import optparse
 import sys
 sys.path.insert(0, "bin/python")
 import samba
+samba.ensure_external_module("mimeparse", "mimeparse")
+samba.ensure_external_module("extras", "extras")
 samba.ensure_external_module("testtools", "testtools")
 samba.ensure_external_module("subunit", "subunit/python")
 
-- 
2.1.1



More information about the samba-technical mailing list