From f45e70fdbc7382a1bc491f5a77cbdf5ec7fb43bf Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Thu, 13 Nov 2014 17:14:38 -0800 Subject: [PATCH] Moving unittests to the main ansible repo for now --- lib/ansible/modules/tests/__init__.py | 0 lib/ansible/modules/tests/test_apt.py | 40 --------------------------- 2 files changed, 40 deletions(-) delete mode 100644 lib/ansible/modules/tests/__init__.py delete mode 100644 lib/ansible/modules/tests/test_apt.py diff --git a/lib/ansible/modules/tests/__init__.py b/lib/ansible/modules/tests/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/lib/ansible/modules/tests/test_apt.py b/lib/ansible/modules/tests/test_apt.py deleted file mode 100644 index a7eb3d3feec..00000000000 --- a/lib/ansible/modules/tests/test_apt.py +++ /dev/null @@ -1,40 +0,0 @@ -import collections -import mock -import os -import unittest - -from packaging.apt import ( - expand_pkgspec_from_fnmatches, -) - - -class AptExpandPkgspecTestCase(unittest.TestCase): - - def setUp(self): - FakePackage = collections.namedtuple("Package", ("name",)) - self.fake_cache = [ FakePackage("apt"), - FakePackage("apt-utils"), - ] - - def test_trivial(self): - foo = ["apt"] - self.assertEqual( - expand_pkgspec_from_fnmatches(None, foo, self.fake_cache), foo) - - def test_bug_28(self): - foo = ["apt=1.0*"] - self.assertEqual( - expand_pkgspec_from_fnmatches(None, foo, self.fake_cache), foo) - - def test_pkgname_wildcard_version_wildcard_fails(self): - foo = ["apt*=1.0*"] - m_mock = mock.Mock() - expand_pkgspec_from_fnmatches(m_mock, foo, self.fake_cache) - self.assertTrue(m_mock.fail_json.called) - - def test_pkgname_expands(self): - foo = ["apt*"] - m_mock = mock.Mock() - self.assertEqual( - expand_pkgspec_from_fnmatches(m_mock, foo, self.fake_cache), - ["apt", "apt-utils"])