def test_baseimage_first(self): """Base image is always first""" s = Stage() s += shell(commands=['abc']) s.name = 'bar' s.baseimage('foo') self.assertEqual(str(s), 'FROM foo AS bar\n\nRUN abc')
def test_baseimage(self): """Base image specification""" s = Stage() s.name = 'bar' s.baseimage('foo') self.assertEqual(str(s), 'FROM foo AS bar')