summaryrefslogtreecommitdiffstats
path: root/roles/openshift_master_facts
diff options
context:
space:
mode:
authorRodolfo Carvalho <rhcarvalho@gmail.com>2017-02-18 04:13:31 +0100
committerRodolfo Carvalho <rhcarvalho@gmail.com>2017-02-20 17:13:52 +0100
commitc008153397d5a34a21301cb5dabb6fe27df2fe47 (patch)
tree1eb81f348f852cd6e197c41dac213fdc5caff2d0 /roles/openshift_master_facts
parente7b4e49247097323d0ef07b5ca63759b5ab502ee (diff)
downloadopenshift-c008153397d5a34a21301cb5dabb6fe27df2fe47.tar.gz
openshift-c008153397d5a34a21301cb5dabb6fe27df2fe47.tar.bz2
openshift-c008153397d5a34a21301cb5dabb6fe27df2fe47.tar.xz
openshift-c008153397d5a34a21301cb5dabb6fe27df2fe47.zip
Replace assert_equal with plain assert
In the intention to remove the dependency on nose and use only pytest.
Diffstat (limited to 'roles/openshift_master_facts')
-rw-r--r--roles/openshift_master_facts/test/openshift_master_facts_default_predicates_tests.py26
-rw-r--r--roles/openshift_master_facts/test/openshift_master_facts_default_priorities_tests.py26
2 files changed, 24 insertions, 28 deletions
diff --git a/roles/openshift_master_facts/test/openshift_master_facts_default_predicates_tests.py b/roles/openshift_master_facts/test/openshift_master_facts_default_predicates_tests.py
index 1d6de616a..855f42273 100644
--- a/roles/openshift_master_facts/test/openshift_master_facts_default_predicates_tests.py
+++ b/roles/openshift_master_facts/test/openshift_master_facts_default_predicates_tests.py
@@ -2,8 +2,6 @@ import copy
import os
import sys
-from nose.tools import assert_equal
-
sys.path.insert(1, os.path.join(os.path.dirname(__file__), os.pardir, "lookup_plugins"))
from openshift_master_facts_default_predicates import LookupModule # noqa: E402
@@ -110,9 +108,9 @@ class TestOpenShiftMasterFactsDefaultPredicates(object):
results = self.lookup.run(None, variables=facts,
regions_enabled=regions_enabled)
if regions_enabled:
- assert_equal(results, default_predicates + [REGION_PREDICATE])
+ assert results == default_predicates + [REGION_PREDICATE]
else:
- assert_equal(results, default_predicates)
+ assert results == default_predicates
def test_release_defaults(self):
for regions_enabled in (True, False):
@@ -137,9 +135,9 @@ class TestOpenShiftMasterFactsDefaultPredicates(object):
results = self.lookup.run(None, variables=facts,
regions_enabled=regions_enabled)
if regions_enabled:
- assert_equal(results, default_predicates + [REGION_PREDICATE])
+ assert results == default_predicates + [REGION_PREDICATE]
else:
- assert_equal(results, default_predicates)
+ assert results == default_predicates
def test_short_version_defaults(self):
for regions_enabled in (True, False):
@@ -154,9 +152,9 @@ class TestOpenShiftMasterFactsDefaultPredicates(object):
results = self.lookup.run(None, variables=facts,
regions_enabled=regions_enabled)
if regions_enabled:
- assert_equal(results, default_predicates + [REGION_PREDICATE])
+ assert results == default_predicates + [REGION_PREDICATE]
else:
- assert_equal(results, default_predicates)
+ assert results == default_predicates
def test_short_version_kwarg(self):
for regions_enabled in (True, False):
@@ -171,9 +169,9 @@ class TestOpenShiftMasterFactsDefaultPredicates(object):
regions_enabled=regions_enabled,
short_version=short_version)
if regions_enabled:
- assert_equal(results, default_predicates + [REGION_PREDICATE])
+ assert results == default_predicates + [REGION_PREDICATE]
else:
- assert_equal(results, default_predicates)
+ assert results == default_predicates
def test_deployment_type_kwarg(self):
for regions_enabled in (True, False):
@@ -188,9 +186,9 @@ class TestOpenShiftMasterFactsDefaultPredicates(object):
regions_enabled=regions_enabled,
deployment_type=deployment_type)
if regions_enabled:
- assert_equal(results, default_predicates + [REGION_PREDICATE])
+ assert results == default_predicates + [REGION_PREDICATE]
else:
- assert_equal(results, default_predicates)
+ assert results == default_predicates
def test_only_kwargs(self):
for regions_enabled in (True, False):
@@ -205,6 +203,6 @@ class TestOpenShiftMasterFactsDefaultPredicates(object):
short_version=short_version,
deployment_type=deployment_type)
if regions_enabled:
- assert_equal(results, default_predicates + [REGION_PREDICATE])
+ assert results == default_predicates + [REGION_PREDICATE]
else:
- assert_equal(results, default_predicates)
+ assert results == default_predicates
diff --git a/roles/openshift_master_facts/test/openshift_master_facts_default_priorities_tests.py b/roles/openshift_master_facts/test/openshift_master_facts_default_priorities_tests.py
index 32edc4c34..d27a48ede 100644
--- a/roles/openshift_master_facts/test/openshift_master_facts_default_priorities_tests.py
+++ b/roles/openshift_master_facts/test/openshift_master_facts_default_priorities_tests.py
@@ -2,8 +2,6 @@ import copy
import os
import sys
-from nose.tools import assert_equal
-
sys.path.insert(1, os.path.join(os.path.dirname(__file__), os.pardir, "lookup_plugins"))
from openshift_master_facts_default_priorities import LookupModule # noqa: E402
@@ -97,9 +95,9 @@ class TestOpenShiftMasterFactsDefaultPredicates(object):
facts['openshift']['common']['deployment_type'] = deployment_type
results = self.lookup.run(None, variables=facts, zones_enabled=zones_enabled)
if zones_enabled:
- assert_equal(results, default_priorities + [ZONE_PRIORITY])
+ assert results == default_priorities + [ZONE_PRIORITY]
else:
- assert_equal(results, default_priorities)
+ assert results == default_priorities
def test_release_defaults(self):
for zones_enabled in (True, False):
@@ -123,9 +121,9 @@ class TestOpenShiftMasterFactsDefaultPredicates(object):
facts['openshift']['common']['deployment_type'] = deployment_type
results = self.lookup.run(None, variables=facts, zones_enabled=zones_enabled)
if zones_enabled:
- assert_equal(results, default_priorities + [ZONE_PRIORITY])
+ assert results == default_priorities + [ZONE_PRIORITY]
else:
- assert_equal(results, default_priorities)
+ assert results == default_priorities
def test_short_version_defaults(self):
for zones_enabled in (True, False):
@@ -139,9 +137,9 @@ class TestOpenShiftMasterFactsDefaultPredicates(object):
facts['openshift']['common']['deployment_type'] = deployment_type
results = self.lookup.run(None, variables=facts, zones_enabled=zones_enabled)
if zones_enabled:
- assert_equal(results, default_priorities + [ZONE_PRIORITY])
+ assert results == default_priorities + [ZONE_PRIORITY]
else:
- assert_equal(results, default_priorities)
+ assert results == default_priorities
def test_short_version_kwarg(self):
for zones_enabled in (True, False):
@@ -156,9 +154,9 @@ class TestOpenShiftMasterFactsDefaultPredicates(object):
zones_enabled=zones_enabled,
short_version=short_version)
if zones_enabled:
- assert_equal(results, default_priorities + [ZONE_PRIORITY])
+ assert results == default_priorities + [ZONE_PRIORITY]
else:
- assert_equal(results, default_priorities)
+ assert results == default_priorities
def test_deployment_type_kwarg(self):
for zones_enabled in (True, False):
@@ -173,9 +171,9 @@ class TestOpenShiftMasterFactsDefaultPredicates(object):
zones_enabled=zones_enabled,
deployment_type=deployment_type)
if zones_enabled:
- assert_equal(results, default_priorities + [ZONE_PRIORITY])
+ assert results == default_priorities + [ZONE_PRIORITY]
else:
- assert_equal(results, default_priorities)
+ assert results == default_priorities
def test_only_kwargs(self):
for zones_enabled in (True, False):
@@ -190,6 +188,6 @@ class TestOpenShiftMasterFactsDefaultPredicates(object):
short_version=short_version,
deployment_type=deployment_type)
if zones_enabled:
- assert_equal(results, default_priorities + [ZONE_PRIORITY])
+ assert results == default_priorities + [ZONE_PRIORITY]
else:
- assert_equal(results, default_priorities)
+ assert results == default_priorities