tests: Push example blueprints b/c they may not exist

Related: rhbz#1825190
This commit is contained in:
Alexander Todorov 2020-08-05 14:22:09 +03:00 committed by Brian C. Lane
parent 93d8e1ed0d
commit 3ff8614cc7
1 changed files with 10 additions and 0 deletions

View File

@ -121,6 +121,16 @@ dict_name_results3 = "/root, /home/norm, /home/cliff"
class BlueprintsTest(unittest.TestCase):
@unittest.skipUnless(os.path.exists("/run/weldr/api.socket"), "Setup requires a running API server")
@classmethod
def setUpClass(cls):
"""
Make sure that example blueprints are pushed to the server!
"""
rc = blueprints_push("/run/weldr/api.socket", 0,
["example-http-server.toml", "example-development.toml"], show_json=False)
assert rc == 0
def test_pretty_diff_entry(self):
"""Return a nice representation of a diff entry"""
self.assertEqual([pretty_diff_entry(entry) for entry in diff_entries], diff_result)