[SCM] GUI front-end for Debian Live. branch, master, updated. 11e67a56b24563c3f7a488602604f9ba897740c3

Chris Lamb chris at chris-lamb.co.uk
Tue Mar 4 03:01:20 UTC 2008


The following commit has been merged in the master branch:
commit 11e67a56b24563c3f7a488602604f9ba897740c3
Author: Chris Lamb <chris at chris-lamb.co.uk>
Date:   Tue Mar 4 03:00:51 2008 +0000

    Update tests to match new API.
    
    Signed-off-by: Chris Lamb <chris at chris-lamb.co.uk>

diff --git a/tests/test_config.py b/tests/test_config.py
new file mode 100755
index 0000000..7611193
--- /dev/null
+++ b/tests/test_config.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+
+import unittest
+import os
+
+import sys
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+
+from DebianLive import Config
+
+class TestConfig(unittest.TestCase):
+    def setUp(self):
+        import tempfile
+        self.dir = tempfile.mkdtemp()
+        self.lh = Config(self.dir)
+
+    def tearDown(self):
+        import shutil
+        shutil.rmtree(self.dir)
+
+class TestCreation(TestConfig):
+    def testLhConfigRun(self):
+        assert os.path.exists(os.path.join(self.dir, 'config'))
+
+    def testFailingNewConfiguration(self):
+        """
+        Should throw IOError for an invalid directory.
+        """
+        self.assertRaises(IOError, Config, '/proc')
+
+class TestElements(TestConfig):
+    def testBinary(self):
+        from DebianLive.elements import KeyVar
+        self.assertEqual(type(self.lh.binary), KeyVar)
+
+class TestSetGetOptions(TestConfig):
+    def testGet(self):
+        self.assertEqual(self.lh.common['LH_APT'], 'aptitude')
+
+    def testSet(self):
+        self.lh.common['LH_APT'] = 'spam'
+        self.assertEqual(self.lh.common['LH_APT'], 'spam')
+
+    def testSetUnknownOption(self):
+        self.lh.common['LH_UNKNOWN_OPTION'] = 'spam'
+        self.assertEqual(self.lh.common['LH_UNKNOWN_OPTION'], 'spam')
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/test_folder_of_files.py b/tests/test_folder_of_files.py
index b883e47..68f7c21 100755
--- a/tests/test_folder_of_files.py
+++ b/tests/test_folder_of_files.py
@@ -1,18 +1,22 @@
 #!/usr/bin/env python
 
 import unittest
-import tempfile
 import os
 
 import sys
 sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
-from LiveMagic import models
+from DebianLive.elements import FolderOfFiles
 
 class TestFolderOfFiles(unittest.TestCase):
     def setUp(self):
-        self.dir = tempfile.mkdtemp('live-magic')
-        self.fof = models.FolderOfFiles(self.dir)
+        import tempfile
+        self.dir = tempfile.mkdtemp()
+        self.fof = FolderOfFiles(self.dir, 'dummy name', 'fof-test')
+
+    def tearDown(self):
+        import shutil
+        shutil.rmtree(self.dir)
 
     def f_c(self, filename):
         return open("%s/%s" % (self.dir, filename), 'r').read()
diff --git a/tests/test_key_var.py b/tests/test_key_var.py
new file mode 100755
index 0000000..27d7e40
--- /dev/null
+++ b/tests/test_key_var.py
@@ -0,0 +1,231 @@
+#!/usr/bin/env python
+
+import unittest
+import os
+import sys
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+
+from DebianLive.elements import KeyVar
+
+class TestKeyVar(unittest.TestCase):
+    spec = {
+        'LH_SPAM': str,
+        'LH_MORE_SPAM': str,
+        'LH_SPAM_LIST' : list,
+        'LH_SPAM_BOOL' : bool,
+    }
+
+    initial = """
+ LH_SPAM="eggs"
+ LH_MORE_SPAM="more eggs"
+   LH_SPAM_LIST="spam eggs ham bacon"
+        LH_SPAM_BOOL="disabled"
+    """
+
+    name = 'test_key_var'
+
+    def setUp(self, reset=False):
+        import tempfile
+        self.dir = tempfile.mkdtemp('debian-live')
+        os.makedirs(os.path.join(self.dir, 'config'))
+
+        self.filename = os.path.join(self.dir, 'config', self.name)
+        f = open(self.filename, 'w+')
+        f.write(self.initial)
+        f.close()
+
+        self.key_var = KeyVar(self.dir, self.name, self.spec)
+
+    def tearDown(self):
+        import shutil
+        shutil.rmtree(self.dir)
+
+    def reset(self):
+        self.tearDown()
+        self.setUp()
+
+    def f_c(self, filename=None):
+        if filename is None:
+            filename = self.filename
+        return [x.strip() for x in open(filename, 'r').readlines()]
+
+    ###
+
+class TestSimple(TestKeyVar):
+    def testSetAndGetOption(self):
+        self.key_var['LH_SPAM'] = 'eggs'
+        self.assertEqual(self.key_var['LH_SPAM'], 'eggs')
+
+    def testSaveKnownOption(self):
+        self.key_var['LH_SPAM'] = "eggs"
+        assert 'LH_SPAM="eggs"' in self.f_c()
+
+    def testSaveUnknownOption(self):
+        """
+        Unknown configuration keys should be added to the file.
+        """
+        self.key_var['LH_UNKNOWN_OPTION'] = 'spam'
+        self.key_var.save()
+        assert 'LH_UNKNOWN_OPTION="spam"' in self.f_c()
+
+class TestSaveEscaped(TestKeyVar):
+    def testSavingEscapingCharacters(self):
+        """
+        Characters should be escaped when saving file.
+        """
+        tests = {
+            r'"' : r'\"',
+            r'`' : r'\`',
+            r'$' : r'\$',
+            r'\ '[:-1] : r'\\ '[:-1],
+        }
+        for input, expected in tests.iteritems():
+            self.key_var['LH_TEST'] = input
+            self.key_var.save()
+            self.assert_('LH_TEST="%s"' % expected in self.f_c(), \
+                "Input was '%s', expected '%s'" % (input, expected))
+
+class TestLoadEscaped(TestKeyVar):
+    def testLoadingEscapedCharacters(self):
+        """
+        Characters should be unescaped when saving file.
+        """
+        tests = {
+            r'Test' : r'Test',
+            r'\\ '[:-1] : r'\ '[:-1],
+            r'\"Test\"' : r'"Test"',
+            r'\`Test\`\`Test\`' : r'`Test``Test`',
+            r"\'Test\'" : r"'Test'",
+        }
+
+        for input, expected in tests.iteritems():
+            # Write escaped string
+            self.initial = 'LH_SPAM="%s"' % input
+
+            # Reload configuration and check against expected value
+            self.reset()
+            self.assert_(self.key_var['LH_SPAM'] == expected, \
+                "Got back '%s', expected '%s'" % (self.key_var['LH_SPAM'], expected))
+
+class TestAccept(TestKeyVar):
+    """
+    Tests acceptance of strange alignments/configurations/spacings of KEY="value" pairs.
+    """
+
+    def assertAccepts(self, input):
+        self.initial = input
+        self.reset()
+        self.assertEquals(self.key_var['LH_SPAM'], 'eggs')
+
+    def testNormal(self):
+        self.assertAccepts(r'LH_SPAM="eggs"')
+
+    def testSpacing(self):
+        self.assertAccepts(r"LH_SPAM='eggs' ")
+
+    def testSpacingBoth(self):
+        self.assertAccepts(r'  LH_SPAM="eggs"  ')
+
+    def testTwoComments(self):
+        self.assertAccepts(r'LH_SPAM="eggs" # comment # comment ')
+
+    def testCommentsWithQuotes(self):
+        self.assertAccepts(r'LH_SPAM="eggs" # comment with a " " sign')
+
+    def testSpacingEnd(self):
+        self.assertAccepts(r'LH_SPAM="eggs"  ')
+
+    def testNoQuotes(self):
+        self.assertAccepts(r'LH_SPAM=eggs')
+
+    def testNoQuotesSpacing(self):
+        self.assertAccepts(r'LH_SPAM=eggs ')
+
+class TestAllignmentReject(TestKeyVar):
+    def testNonStandardAlignmentRejection(self):
+        """
+        Tests rejection strange alignments/configurations/spacings of KEY="value" pairs.
+        """
+        reject = [
+            r'#LH_SPAM="eggs"', # commented out
+            r'LH_SPAM ="eggs"',
+            r'LH_SPAM= "eggs"',
+            r'LH_SPAM="eggs',
+            r'LH_SPAM=eggs"',
+            r'LH_SPAM=spam eggs',
+        ]
+        for r in reject:
+            self.initial = r
+            self.reset()
+            self.assertEqual(repr(self.key_var), '{}')
+
+class TestSaveLists(TestKeyVar):
+    def testSaveList(self):
+        expected = [
+            (['eggs'], "eggs"),
+            (['one', 'two', 'three'], "one two three"),
+            ([' one ', ' two ', ' three '], "one two three"),
+            ([], ""),
+            (None, ""),
+        ]
+
+        for k, v in expected:
+            self.key_var['LH_SPAM_LIST'] = k
+            self.key_var.save()
+            assert 'LH_SPAM_LIST="%s"' % v in self.f_c()
+
+
+class TestLoadLists(TestKeyVar):
+    def assertLoadsAs(self, input, expected):
+        self.initial = 'LH_SPAM_LIST="%s"' % input
+        self.reset()
+        self.assertEqual(self.key_var['LH_SPAM_LIST'], expected)
+
+    def testEmptyString(self):
+        self.assertLoadsAs("", [])
+
+    def testSimpleList(self):
+        self.assertLoadsAs('foo bar baz', ['foo', 'bar', 'baz'])
+
+    def testSimpleListTwo(self):
+        self.assertLoadsAs('foo bar-2 baz', ['foo', 'bar-2', 'baz'])
+
+class TestBoolSave(TestKeyVar):
+    def assertSavesAs(self, input, expected):
+        self.key_var['LH_SPAMBOOL'] = input
+        self.key_var.save()
+        assert 'LH_SPAMBOOL="%s"' % expected in self.f_c()
+
+    def testSaveNone(self):
+        self.assertSavesAs(None, '')
+
+    def testSaveFalse(self):
+        self.assertSavesAs(False, 'disabled')
+
+    def testSaveTrue(self):
+        self.assertSavesAs(True, 'enabled')
+
+class TestBoolLoad(TestKeyVar):
+    def assertParsesAs(self, input, expected):
+        self.initial = 'LH_SPAM_BOOL="%s"' % input
+        self.reset()
+        self.assertEqual(self.key_var['LH_SPAM_BOOL'], expected)
+
+    def testEnabled(self):
+        self.assertParsesAs('enabled', True)
+
+    def testDisabled(self):
+        self.assertParsesAs('disabled', False)
+
+    def testYes(self):
+        self.assertParsesAs('yes', True)
+
+    def testNo(self):
+        self.assertParsesAs('no', False)
+
+    def testBlank(self):
+        self.assertParsesAs('', None)
+        self.assertParsesAs(' ', None)
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/test_key_var_config_file.py b/tests/test_key_var_config_file.py
deleted file mode 100755
index ab25510..0000000
--- a/tests/test_key_var_config_file.py
+++ /dev/null
@@ -1,219 +0,0 @@
-#!/usr/bin/env python
-
-import unittest
-import tempfile
-import os
-
-import sys
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-
-from LiveMagic import models
-
-class TestKeyVarConfigFile(unittest.TestCase):
-    def setUp(self):
-        fd, self.filename = tempfile.mkstemp('live-magic')
-        os.close(fd)
-        spec = {
-            'LH_SPAM': 'string',
-            'LH_MORESPAM': 'string',
-            'LH_SPAMLIST' : 'list',
-            'LH_SPAMBOOL' : 'boolean',
-        }
-        self.keyvar = models.KeyVarConfigFile(self.filename, spec)
-
-    def f_c(self, filename=None):
-        if filename is None: filename = self.filename
-        return open(filename, 'r').readlines()
-
-    def f_w(self, contents, filename=None):
-        if filename is None: filename = self.filename
-        f = open(filename, 'w+')
-        f.write(contents)
-        f.close()
-
-    def testSetAndGetOption(self):
-        self.keyvar.LH_SPAM = "eggs"
-        assert self.keyvar.LH_SPAM == "eggs"
-
-    def testSaveKnownOption(self):
-        self.keyvar.LH_SPAM = "eggs"
-        self.keyvar.save()
-        assert 'LH_SPAM="eggs"\n' in self.f_c()
-
-    def testSaveUnknownOption(self):
-        """
-        Unknown configuration keys should be added to the file.
-        """
-        assert len(self.f_c()) == 0
-        self.keyvar.LH_SPAM = "eggs"
-        self.keyvar.save()
-        assert 'LH_SPAM="eggs"\n' in self.f_c()
-
-    def testUpdatesOptions(self):
-        """
-        Updating an existing option should not increase the length of the file.
-        """
-        self.keyvar.LH_SPAM = "eggs"
-        self.keyvar.LH_MORESPAM = "moreeggs"
-        self.keyvar.save()
-        self.keyvar.save()
-        self.keyvar.load()
-        save = len(self.f_c())
-        self.keyvar.LH_SPAM = "yetmoreeggs"
-        self.keyvar.save()
-        assert len(self.f_c()) == save
-
-    def testConfFileAlteredState(self):
-        """
-        Should change state when they have been altered.
-        """
-        assert self.keyvar.altered() == False
-        self.keyvar.LH_SPAM = "eggs"
-        assert self.keyvar.altered() == True
-
-    def testConfLoadResetState(self):
-        """
-        Reloading the configuration should reset state.
-        """
-        assert self.keyvar.altered() == False
-        self.keyvar.LH_SPAM = "eggs"
-        assert self.keyvar.altered() == True
-        self.keyvar.load()
-        assert self.keyvar.altered() == False
-        assert not hasattr(self.keyvar, 'LH_SPAM')
-
-    def testSavingEscapingCharacters(self):
-        """
-        Characters should be escaped when saving file.
-        """
-        tests = {
-            r'"' : r'\"',
-            r'`' : r'\`',
-            r'$' : r'\$',
-            r'\ '[:-1] : r'\\ '[:-1],
-        }
-        for input, expected in tests.iteritems():
-            self.keyvar.LH_TEST = input
-            self.keyvar.save()
-            self.assert_('LH_TEST="%s"\n' % expected in self.f_c(), \
-                "Input was '%s', expected '%s'" % (input, expected))
-
-    def testLoadingEscapedCharacters(self):
-        """
-        Characters should be unescaped when saving file.
-        """
-        tests = {
-            r'Test' : r'Test',
-            r'\\ '[:-1] : r'\ '[:-1],
-            r'\"Test\"' : r'"Test"',
-            r'\`Test\`\`Test\`' : r'`Test``Test`',
-            r"\'Test\'" : r"'Test'",
-        }
-
-        for input, expected in tests.iteritems():
-            # Write escaped string
-            self.f_w('LH_SPAM="%s"' % input)
-
-            # Reload configuration and check against expected value
-            self.keyvar.load()
-            self.assert_(self.keyvar.LH_SPAM == expected, \
-                "Got back '%s', expected '%s'" % (self.keyvar.LH_SPAM, expected))
-
-    def testNonStandardAlignmentAcceptance(self):
-        """
-        Tests acceptance of strange alignments/configurations/spacings of KEY="value" pairs.
-        """
-        accept = [
-            r'LH_SPAM="eggs"',
-            r'  LH_SPAM="eggs"  ',
-            r'LH_SPAM="eggs" # comment # comment ',
-            r'LH_SPAM="eggs" # comment with a " " sign',
-            r'LH_SPAM="eggs"  ',
-            r'LH_SPAM=eggs',
-            r'LH_SPAM=eggs ',
-            r"LH_SPAM='eggs' ",
-        ]
-        for a in accept:
-            self.f_w(a)
-
-            # Reload configuration and check against expected value
-            self.keyvar.load()
-            msg = "Should have accepted '%s'" % a
-            try:
-                self.assert_(self.keyvar.LH_SPAM == 'eggs', msg + ", saw '%s'" % self.keyvar.LH_SPAM)
-            except AttributeError:
-                self.fail(msg=msg)
-
-    def testNonStandardAlignmentRejection(self):
-        """
-        Tests rejection strange alignments/configurations/spacings of KEY="value" pairs.
-        """
-        reject = [
-            r'#LH_SPAM="eggs"', # commented out
-            r'LH_SPAM ="eggs"',
-            r'LH_SPAM= "eggs"',
-            r'LH_SPAM="eggs',
-            r'LH_SPAM=eggs"',
-            r'LH_SPAM=spam eggs',
-        ]
-        for r in reject:
-            self.f_w(r)
-
-            # Reload configuration and check against expected value
-            self.keyvar.load()
-            self.assert_(not hasattr(self.keyvar, 'LH_SPAM'), "Should have rejected '%s'" % r)
-
-    def testSaveList(self):
-        expected = [
-            (['eggs'], "eggs"),
-            (['one', 'two', 'three'], "one two three"),
-            ([' one ', ' two ', ' three '], "one two three"),
-            ([], ""),
-            (None, ""),
-        ]
-
-        for k, v in expected:
-            self.keyvar.LH_SPAMLIST = k
-            self.keyvar.save()
-            assert 'LH_SPAMLIST="%s"\n' % v in self.f_c()
-
-    def testLoadList(self):
-        expected = {
-            "" : [],
-            "foo bar baz" : ['foo', 'bar', 'baz'],
-            "foo bar-2 baz" : ['foo', 'bar-2', 'baz'],
-        }
-
-        for k, v in expected.iteritems():
-            self.f_w('LH_SPAMLIST="%s"' % k)
-            self.keyvar.load()
-            assert self.keyvar.LH_SPAMLIST == v
-
-    def testSaveBool(self):
-        expected = {
-            None : "",
-            False : "disabled",
-            True : "enabled",
-        }
-
-        for k, v in expected.iteritems():
-            self.keyvar.LH_SPAMBOOL = k
-            self.keyvar.save()
-            assert 'LH_SPAMBOOL="%s"\n' % v in self.f_c()
-
-    def testBooleanTypeLoad(self):
-        expected = {
-            'enabled' : True,
-            'disabled' : False,
-            'yes' : True,
-            'no' : False,
-            '' : None,
-        }
-
-        for k, v in expected.iteritems():
-            self.f_w('LH_SPAMBOOL="%s"' % k)
-            self.keyvar.load()
-            assert self.keyvar.LH_SPAMBOOL == v
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/tests/test_live_helper_configuration.py b/tests/test_live_helper_configuration.py
deleted file mode 100755
index 432e770..0000000
--- a/tests/test_live_helper_configuration.py
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/env python
-
-import unittest
-import tempfile
-import os
-
-import sys
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-
-from LiveMagic import models
-
-class TestConfiguration(unittest.TestCase):
-    def setUp(self):
-        self.dir = tempfile.mkdtemp()
-        self.conf = models.LiveHelperConfiguration(self.dir)
-        self.conf.new()
-
-    def testSimpleSetup(self):
-        """
-        Test whether we can create an empty configuration.
-        """
-        assert os.path.exists("%s/config/common" % self.conf.dir)
-
-    def testFailingNewConfiguration(self):
-        """Should throw IOError for an invalid directory"""
-        self.assertRaises(IOError, self.conf.open, "/proc")
-
-    def testNew(self):
-        """
-        new() should load a new configuration.
-        """
-        self.conf.common.LH_SPAM = "eggs"
-        self.conf.save()
-
-        saved_dir = self.conf.dir
-
-        self.setUp()
-        assert not hasattr(self.conf.common, 'LH_SPAM')
-
-        self.conf.open(saved_dir)
-        assert self.conf.common.LH_SPAM == "eggs"
-
-    def testGetOption(self):
-        assert "apt" in self.conf.common.LH_APT
-
-    def testSetKnownOption(self):
-        self.conf.common.LH_APT = "apt-get"
-        assert self.conf.common.LH_APT == "apt-get"
-
-    def testSetUnknownOption(self):
-        self.conf.common.LH_UNKNOWN_OPTION = "Testing value"
-        assert self.conf.common.LH_UNKNOWN_OPTION == "Testing value"
-
-    def testChildAlteredState(self):
-        """
-        Object should change state when a child object changes state.
-        """
-        assert self.conf.altered() == False
-        self.conf.common.LH_SPAM = "eggs"
-        assert self.conf.altered() == True
-
-    def testConfLoadResetState(self):
-        """
-        Reloading the configuration should reset state.
-        """
-        assert self.conf.altered() == False
-        self.conf.common.LH_SPAM = "eggs"
-        assert self.conf.altered() == True
-        self.conf.reload()
-        assert not hasattr(self.conf.common, 'LH_SPAM')
-        assert self.conf.altered() == False
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/tests/test_sources_list.py b/tests/test_sources_list.py
index 44cdfd6..31fc3cd 100755
--- a/tests/test_sources_list.py
+++ b/tests/test_sources_list.py
@@ -1,75 +1,83 @@
 #!/usr/bin/env python
 
 import unittest
-import tempfile
 import os
 
 import sys
 sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
-from LiveMagic import models
+from DebianLive.utils import SourcesList
 
 class TestSourcesList(unittest.TestCase):
     def setUp(self):
-        self.reset()
-
-    def reset(self):
+        import tempfile
         fd, self.filename = tempfile.mkstemp('live-magic')
         os.close(fd)
-        self.s = models.SourcesList(self.filename)
+        self.s = SourcesList(self.filename)
+
+    def tearDown(self):
+        os.unlink(self.filename)
 
     def f_w(self, contents):
         f = open(self.filename, 'w+')
         f.write(contents)
         f.close()
 
-    def testIsNotNone(self):
-        self.f_w('deb http://ftp.us.debian.org/debian stable main')
-        assert self.s.get_mirror() is not None
+class TestMatch(TestSourcesList):
+    def assertMatchLine(self, line):
+        self.f_w(line)
+        self.assert_(self.s.get_mirror(None))
 
-    # Match types
-    def _match_type(self, url):
-        self.f_w('deb %s stable main' % url)
-        return self.s.get_mirror() == url
+    def testCountryDebianMirror(self):
+        self.assertMatchLine('deb http://ftp.uk.debian.org/debian stable main')
 
     def testDebianMirror(self):
-        assert self._match_type('http://ftp.uk.debian.org/debian')
+        self.assertMatchLine('deb http://ftp.debian.org/debian stable main')
 
     def testLocalhost(self):
-        assert self._match_type('http://localhost/debian')
+        self.assertMatchLine('deb http://localhost/debian stable main')
 
     def testOtherURL(self):
-        assert self._match_type('http://the.earth.li/debian')
+        self.assertMatchLine('deb http://the.earth.li/debian stable main')
+
+class TestNoMatch(TestSourcesList):
+    def assertNoMatchLine(self, line):
+        self.f_w(line)
+        self.failIf(self.s.get_mirror(None))
+
+    def testSecurity(self):
+        self.assertNoMatchLine('deb http://security.debian.org/debian stable main')
 
-    def testNoSecurity(self):
-        assert not self._match_type('http://security.debian.org/debian')
+    def testBackports(self):
+        self.assertNoMatchLine('deb http://backports.debian.org/debian stable main')
 
-    def testNoBackports(self):
-        assert not self._match_type('http://www.backports.debian.org/debian')
+"""
+# Not implemented yet
 
-    # Preferences
-    def _prefer(self, ordering):
+class Prefer(TestSourcesList):
+    def assertPrefer(self, *ordering):
         def test():
-            self.f_w("""
+            self.f_w(""""""
                 deb %s stable main
                 deb %s stable main
-            """ % (ordering[0], ordering[1]))
+            """""" % (ordering[0], ordering[1]))
 
-            assert self.s.get_mirror() == ordering[0]
+            self.assertEqual(self.s.get_mirror(), ordering[0])
 
         test()
         ordering.reverse()
-        self.reset()
+        self.setUp()
         test()
 
     def testPreferLocalhost(self):
-        self._prefer(['http://localhost/debian', 'http://ftp.uk.debian.org/debian'])
+        self.assertPrefer('http://localhost/debian', 'http://ftp.uk.debian.org/debian')
 
     def testPreferCountry(self):
-        self._prefer(['http://ftp.uk.debian.org/debian', 'http://ftp.debian.org/debian'])
+        self.assertPrefer('http://ftp.uk.debian.org/debian', 'http://ftp.debian.org/debian')
 
     def testPreferNonOfficial(self):
-        self._prefer(['http://ftp.uk.debian.org/debian', 'http://backports.debian.org/debian'])
+        self.assertPrefer('http://ftp.uk.debian.org/debian', 'http://backports.debian.org/debian')
+"""
 
 if __name__ == "__main__":
     unittest.main()

-- 
GUI front-end for Debian Live.



More information about the debian-live-changes mailing list