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