Пример #1
0
    def testGetTagNames(self):
        # test default implementation
        tags = DistribServer.getTagNames(self.ds)
        self.assertEqual(len(tags), 1)
        self.assertIn("current", tags)

        # test configurable implementation (method 3)
        tags = self.ds.getTagNames()
        self.assertEqual(len(tags), 1)
        self.assertIn("current", tags)

        # test configurable impl. (method 2)
        self.ds.setConfigProperty("AVAILABLE_TAGS_URL",
                                  "%(base)s/info/tagnames.txt")
        tags = self.ds.getTagNames()
        self.assertEqual(len(tags), 3)
        self.assertIn("current", tags)
        self.assertIn("beta", tags)
        self.assertIn("stable", tags)

        # test configurable impl. (method 1)
        self.ds.setConfigProperty("AVAILABLE_TAGS", "current beta")
        tags = self.ds.getTagNames()
        self.assertEqual(len(tags), 2)
        self.assertIn("current", tags)
        self.assertIn("beta", tags)
Пример #2
0
    def testGetTagNames(self):
        # test default implementation
        tags = DistribServer.getTagNames(self.ds)
        self.assertEqual(len(tags), 1)
        self.assertIn("current", tags)

        # test configurable implementation (method 3)
        tags = self.ds.getTagNames()
        self.assertEqual(len(tags), 1)
        self.assertIn("current", tags)

        # test configurable impl. (method 2)
        self.ds.setConfigProperty("AVAILABLE_TAGS_URL",
                                  "%(base)s/info/tagnames.txt")
        tags = self.ds.getTagNames()
        self.assertEqual(len(tags), 3)
        self.assertIn("current", tags)
        self.assertIn("beta", tags)
        self.assertIn("stable", tags)

        # test configurable impl. (method 1)
        self.ds.setConfigProperty("AVAILABLE_TAGS", "current beta")
        tags = self.ds.getTagNames()
        self.assertEqual(len(tags), 2)
        self.assertIn("current", tags)
        self.assertIn("beta", tags)
Пример #3
0
    def testGetTagNames(self):
        # test default implementation
        tags = DistribServer.getTagNames(self.ds)
        self.assertEquals(len(tags), 1)
        self.assert_("current" in tags)

        # test configurable implementation (method 3)
        tags = self.ds.getTagNames()
        self.assertEquals(len(tags), 1)
        self.assert_("current" in tags)
Пример #4
0
    def testGetTagNames(self):
        # test default implementation
        tags = DistribServer.getTagNames(self.ds)
        #        print "tags:", tags
        self.assertEqual(len(tags), 3)
        self.assertIn("current", tags)

        # test configurable implementation (method 3)
        tags = self.ds.getTagNames()
        self.assertEqual(len(tags), 3)
        self.assertIn("current", tags)
        self.assertIn("active", tags)
        self.assertIn("alpha", tags)
Пример #5
0
    def testGetTagNames(self):
        # test default implementation
        tags = DistribServer.getTagNames(self.ds)
#        print "tags:", tags
        self.assertEqual(len(tags), 3)
        self.assertIn("current", tags)

        # test configurable implementation (method 3)
        tags = self.ds.getTagNames()
        self.assertEqual(len(tags), 3)
        self.assertIn("current", tags)
        self.assertIn("active", tags)
        self.assertIn("alpha", tags)
Пример #6
0
class WebDistribServerTestCase(unittest.TestCase):
    def setUp(self):
        self.pkgbase = pkgroot + "/s2/"
        self.ds = DistribServer(self.pkgbase)

    def tearDown(self):
        pass

    def testInit(self):
        pass

    def testGetTagNames(self):
        # test default implementation
        tags = DistribServer.getTagNames(self.ds)
        self.assertEqual(len(tags), 1)
        self.assertIn("current", tags)

        # test configurable implementation (method 3)
        tags = self.ds.getTagNames()
        self.assertEqual(len(tags), 1)
        self.assertIn("current", tags)
Пример #7
0
class WebDistribServerTestCase(unittest.TestCase):

    def setUp(self):
        self.pkgbase = pkgroot + "/s2/"
        self.ds = DistribServer(self.pkgbase)

    def tearDown(self):
        pass

    def testInit(self):
        pass

    def testGetTagNames(self):
        # test default implementation
        tags = DistribServer.getTagNames(self.ds)
        self.assertEquals(len(tags), 1)
        self.assert_("current" in tags)

        # test configurable implementation (method 3)
        tags = self.ds.getTagNames()
        self.assertEquals(len(tags), 1)
        self.assert_("current" in tags)
Пример #8
0
class SshDistribServerTestCase(unittest.TestCase):
    def setUp(self):
        self.pkgbase = pkgroot + "/s2"
        if "EUPS_DIR" not in os.environ:
            os.environ["EUPS_DIR"] = os.path.dirname(testEupsStack)
        self.ds = DistribServer(self.pkgbase)

    def tearDown(self):
        pass

    def testInit(self):
        pass

    def testGetTagNames(self):
        # test default implementation
        tags = DistribServer.getTagNames(self.ds)
        self.assertEqual(len(tags), 1)
        self.assertIn("current", tags)

        # test configurable implementation (method 3)
        tags = self.ds.getTagNames()
        self.assertEqual(len(tags), 1)
        self.assertIn("current", tags)
Пример #9
0
class SshDistribServerTestCase(unittest.TestCase):

    def setUp(self):
        self.pkgbase = pkgroot + "/s2"
        if "EUPS_DIR" not in os.environ:
            os.environ["EUPS_DIR"] = os.path.dirname(testEupsStack)
        self.ds = DistribServer(self.pkgbase)

    def tearDown(self):
        pass

    def testInit(self):
        pass

    def testGetTagNames(self):
        # test default implementation
        tags = DistribServer.getTagNames(self.ds)
        self.assertEquals(len(tags), 1)
        self.assertIn("current", tags)

        # test configurable implementation (method 3)
        tags = self.ds.getTagNames()
        self.assertEquals(len(tags), 1)
        self.assertIn("current", tags)
Пример #10
0
 def testGetConfigFile(self):
     ds = DistribServer(self.base)
     configFile = ds.getConfigFile(self.configFile)
     self.assertTrue(os.path.exists(configFile))
Пример #11
0
 def setUp(self):
     self.pkgbase = pkgroot + "/s2/"
     self.ds = DistribServer(self.pkgbase)
Пример #12
0
 def testGetConfigFile(self):
     ds = DistribServer(self.base)
     configFile = ds.getConfigFile(self.configFile)
     self.assert_(os.path.exists(configFile))
Пример #13
0
 def setUp(self):
     self.pkgbase = pkgroot + "/s2"
     if "EUPS_DIR" not in os.environ:
         os.environ["EUPS_DIR"] = os.path.dirname(testEupsStack)
     self.ds = DistribServer(self.pkgbase)
Пример #14
0
 def setUp(self):
     self.pkgbase = pkgroot + "/s2"
     if not os.environ.has_key("EUPS_DIR"):
         os.environ["EUPS_DIR"] = os.path.dirname(testEupsStack)
     self.ds = DistribServer(self.pkgbase)
Пример #15
0
 def setUp(self):
     self.pkgbase = pkgroot + "/s2"
     if "EUPS_DIR" not in os.environ:
         os.environ["EUPS_DIR"] = os.path.dirname(testEupsStack)
     self.ds = DistribServer(self.pkgbase)