2019-10-22 16:13:50 +02:00
|
|
|
import unittest
|
2021-11-23 16:25:09 +08:00
|
|
|
|
2019-10-22 16:13:50 +02:00
|
|
|
from tutor import images
|
2021-04-06 12:09:00 +02:00
|
|
|
from tutor.types import Config
|
2019-10-22 16:13:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
class ImagesTests(unittest.TestCase):
|
2021-02-25 09:09:14 +01:00
|
|
|
def test_get_tag(self) -> None:
|
2021-04-06 12:09:00 +02:00
|
|
|
config: Config = {
|
2020-07-21 09:28:21 +02:00
|
|
|
"DOCKER_IMAGE_OPENEDX": "registry/openedx",
|
|
|
|
"DOCKER_IMAGE_OPENEDX_DEV": "registry/openedxdev",
|
2019-10-22 16:13:50 +02:00
|
|
|
}
|
|
|
|
self.assertEqual("registry/openedx", images.get_tag(config, "openedx"))
|
|
|
|
self.assertEqual("registry/openedxdev", images.get_tag(config, "openedx-dev"))
|