Exemple #1
0
    def test_02_get_remote_egg(self):
        """
        Test _get_remote_egg should return path for cached egg if present,
        path for cached egg if not present locally, but in repo, or exception if not present locally or in repo.
        """

        launcher = ZMQEggDriverProcess("DUMMY_VAL")
        got_exception = False
        try:
            self.assertEqual(launcher._get_remote_egg("NOT_FOUND_EGG"), None)
        except DriverLaunchException:
            got_exception = True
        self.assertTrue(got_exception)

        self.assertEqual(launcher._get_remote_egg(EGG), "/tmp/%s" % EGG)
    def test_02_get_remote_egg(self):
        """
        Test _get_remote_egg should return path for cached egg if present,
        path for cached egg if not present locally, but in repo, or exception if not present locally or in repo.
        """

        launcher = ZMQEggDriverProcess("DUMMY_VAL")
        got_exception = False
        try:
            self.assertEqual(launcher._get_remote_egg("NOT_FOUND_EGG"), None)
        except DriverLaunchException:
            got_exception = True
        self.assertTrue(got_exception)

        self.assertEqual(launcher._get_remote_egg(EGG), "/tmp/%s" % EGG)
Exemple #3
0
    def test_03_check_cache_for_egg(self):
        """
        Test _check_cache_for_egg  checks the cache for the egg,
        returns path if present locally, or None if not.
        """
        # Cleanup on isle one!

        launcher = ZMQEggDriverProcess("DUMMY_VAL")
        self.assertEqual(launcher._get_remote_egg(EGG), "/tmp/%s" % EGG)
        self.assertEqual(launcher._check_cache_for_egg("NOT_FOUND_EGG"), None)
        self.assertEqual(launcher._check_cache_for_egg(EGG), "/tmp/%s" % EGG)
    def test_03_check_cache_for_egg(self):
        """
        Test _check_cache_for_egg  checks the cache for the egg,
        returns path if present locally, or None if not.
        """
        # Cleanup on isle one!

        launcher = ZMQEggDriverProcess("DUMMY_VAL")
        self.assertEqual(launcher._get_remote_egg(EGG), "/tmp/%s" % EGG)
        self.assertEqual(launcher._check_cache_for_egg("NOT_FOUND_EGG"), None)
        self.assertEqual(launcher._check_cache_for_egg(EGG), "/tmp/%s" % EGG)