1
0
mirror of https://github.com/projectatomic/atomic.git synced 2026-02-06 12:45:57 +01:00
Files
atomic/tests/unit/test_pull.py
Giuseppe Scrivano 89b8d23161 tests: test_pull.py doesn't fetch fedora each time
Use the image already fetched through Docker of the fedora image instead
of fetching it over the network each time.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #503
Approved by: cgwalters
2016-07-29 10:50:54 +00:00

26 lines
640 B
Python

import unittest
from Atomic import atomic
class TestAtomicPull(unittest.TestCase):
class Args():
def __init__(self):
self.image = "docker:fedora"
self.user = False
def test_pull_as_privileged_user(self):
args = self.Args()
with atomic.Atomic() as testobj:
testobj.set_args(args)
testobj.pull_image()
def test_pull_as_nonprivileged_user(self):
args = self.Args()
args.user = True
with atomic.Atomic() as testobj:
testobj.set_args(args)
testobj.pull_image()
if __name__ == '__main__':
unittest.main()