File: buildah_test.py

package info (click to toggle)
python-mitogen 0.3.25~a2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 6,220 kB
  • sloc: python: 21,989; sh: 183; makefile: 74; perl: 19; ansic: 18
file content (20 lines) | stat: -rw-r--r-- 682 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import os

import testlib


class ConstructorTest(testlib.RouterMixin, testlib.TestCase):
    def test_okay(self):
        buildah_path = testlib.data_path('stubs/stub-buildah.py')
        context = self.router.buildah(
            container='container_name',
            buildah_path=buildah_path,
        )
        stream = self.router.stream_by_id(context.context_id)

        argv = eval(context.call(os.getenv, 'ORIGINAL_ARGV'))
        self.assertEqual(argv[0], buildah_path)
        self.assertEqual(argv[1], 'run')
        self.assertEqual(argv[2], '--')
        self.assertEqual(argv[3], 'container_name')
        self.assertEqual(argv[4], stream.conn.options.python_path)