ansible/test/units/modules/cloud/docker/test_docker.py
Dag Wieers 4efec414e7 test/: PEP8 compliancy (#24803)
* test/: PEP8 compliancy

- Make PEP8 compliant

* Python3 chokes on casting int to bytes (#24952)

But if we tell the formatter that the var is a number, it works
2017-05-30 18:05:19 +01:00

20 lines
690 B
Python

import collections
import os
import unittest
from ansible.modules.cloud.docker._docker import get_split_image_tag
class DockerSplitImageTagTestCase(unittest.TestCase):
def test_trivial(self):
self.assertEqual(get_split_image_tag('test'), ('test', 'latest'))
def test_with_org_name(self):
self.assertEqual(get_split_image_tag('ansible/centos7-ansible'), ('ansible/centos7-ansible', 'latest'))
def test_with_tag(self):
self.assertEqual(get_split_image_tag('test:devel'), ('test', 'devel'))
def test_with_tag_and_org_name(self):
self.assertEqual(get_split_image_tag('ansible/centos7-ansible:devel'), ('ansible/centos7-ansible', 'devel'))