示例#1
0
class TestDockerfile(unittest.TestCase):

    def setUp(self):
        self.dfile = Dockerfile("sample")
        
    def test_extraction(self):
        self.dfile.parse()
        self.assertEqual(self.dfile.parent, "ubuntu:12.10")
        self.assertEqual(self.dfile.cmd, '["python", "-V"]')
        self.assertEqual(self.dfile.volumes, ['/tmp'])
        self.assertEqual(self.dfile.ports, ['80', '512'])
        self.assertEqual(self.dfile.command, 'python -V')
示例#2
0
 def setUp(self):
     self.dfile = Dockerfile("sample")