def test_docker_lines(self):
     "test docker lines"
     docker_image = "centos:centos7"
     lines = [
         "FROM %s\n" % (docker_image,),
         'RUN yum install rpmdevtools wget -y\n',
         'RUN yum groupinstall "Development Tools" -y\n',
         'RUN rpmdev-setuptree\n',
     ]
     self.assertEqual(lines, package_builder.file_lines(docker_image))
 def test_make_docker_file_default(self):
     "test default docker file content"
     docker_file = "./test/Dockerfile"
     docker_image = "centos:centos7"
     file_lines = package_builder.file_lines(docker_image)
     file_lines_read = file_lines[0]
     file_lines_list = []
     file_lines_list.insert(0, file_lines_read)
     package_builder.make_docker_file_default(docker_image)
     with open(self.docker_file_default, "r") as d_file:
         read_file_lines = d_file.readlines()
     self.assertEqual(read_file_lines, file_lines_list)