1
0
mirror of https://github.com/projectatomic/atomic.git synced 2026-02-06 21:45:24 +01:00
Files
atomic/tests/unit/test_pull.py
Dan Walsh e32d8692ad Split out atomic pull functions into their own source file.
Create a Pull class as a subclass of Atomic and move all of the
functions and CLI to this file.

Closes: #570
Approved by: baude
2016-09-01 19:02:07 +00:00

26 lines
640 B
Python

import unittest
from Atomic.syscontainers import SystemContainers
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()
testobj = SystemContainers()
testobj.set_args(args)
testobj.pull_image()
def test_pull_as_nonprivileged_user(self):
args = self.Args()
args.user = True
testobj = SystemContainers()
testobj.set_args(args)
testobj.pull_image()
if __name__ == '__main__':
unittest.main()