summaryrefslogtreecommitdiff
path: root/selftest/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-03-25 21:38:59 +0100
committerJelmer Vernooij <jelmer@samba.org>2012-03-27 00:32:48 +0200
commit95ebb111ba7e5fbc1e8ca6c560c473d24c5d6c2d (patch)
tree4eee8d3e397eb066547690d8e1bc51bdd763d089 /selftest/tests
parenta9da0409ba0e859533acea83c5c85798705cb5eb (diff)
downloadsamba-95ebb111ba7e5fbc1e8ca6c560c473d24c5d6c2d.tar.gz
samba-95ebb111ba7e5fbc1e8ca6c560c473d24c5d6c2d.tar.bz2
samba-95ebb111ba7e5fbc1e8ca6c560c473d24c5d6c2d.zip
selftest.py: Add get_interface.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Tue Mar 27 00:32:48 CEST 2012 on sn-devel-104
Diffstat (limited to 'selftest/tests')
-rw-r--r--selftest/tests/test_samba.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/selftest/tests/test_samba.py b/selftest/tests/test_samba.py
index f06d846deb..b49463eabb 100644
--- a/selftest/tests/test_samba.py
+++ b/selftest/tests/test_samba.py
@@ -19,16 +19,13 @@
"""Tests for selftest.target.samba."""
-import os
-import sys
-
from cStringIO import StringIO
from selftest.tests import TestCase
from selftest.target.samba import (
bindir_path,
- cleanup_child,
+ get_interface,
mk_realms_stanza,
write_krb5_conf,
)
@@ -107,3 +104,13 @@ class WriteKrb5ConfTests(TestCase):
}
''', f.getvalue())
+
+
+class GetInterfaceTests(TestCase):
+
+ def test_get_interface(self):
+ self.assertEquals(21, get_interface("localdc"))
+ self.assertEquals(4, get_interface("localshare4"))
+
+ def test_unknown(self):
+ self.assertRaises(KeyError, get_interface, "unknown")