Rename locations to images to be consistent

This commit is contained in:
Monty Taylor 2014-07-23 20:51:24 -05:00
parent ea0b0e3b3c
commit f3702bad53
3 changed files with 10 additions and 10 deletions

View File

@ -15,7 +15,7 @@
import argparse
import dox.locations
import dox.images
import dox.payloads
import dox.runner
@ -39,7 +39,7 @@ def main():
image = args.image
if args.image is None:
image = dox.locations.get_image()
image = dox.images.get_image()
if args.command:
command = " ".join(args.extra_args)
else:

View File

@ -15,20 +15,20 @@
# under the License.
"""
test_payloads
test_images
--------------
Tests for `dox.payloads` module.
Tests for `dox.images` module.
"""
import fixtures
import testscenarios
from dox import locations
from dox import images
from dox.tests import base
class TestLocations(base.TestCase):
class TestImages(base.TestCase):
scenarios = [
('have_dockerfile', dict(
@ -67,7 +67,7 @@ class TestLocations(base.TestCase):
]
def setUp(self):
super(TestLocations, self).setUp()
super(TestImages, self).setUp()
self.useFixture(fixtures.MonkeyPatch(
'dox.config.dockerfile.Dockerfile.exists',
base.bool_to_fake(self.dockerfile)))
@ -84,9 +84,9 @@ class TestLocations(base.TestCase):
'dox.config.tox_ini.ToxIni.get_image',
base.get_fake_value(self.tox_value)))
def test_location(self):
l = locations.Location()
self.assertEqual(l.image, self.image)
def test_images(self):
image = images.get_image()
self.assertEqual(image, self.image)
def load_tests(loader, in_tests, pattern):