mirror of
https://github.com/projectatomic/atomic.git
synced 2026-02-06 21:45:24 +01:00
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
26 lines
640 B
Python
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()
|