From de9089a543b542ce48c10e5d33249bd6897e1f42 Mon Sep 17 00:00:00 2001 From: Abhas Bhattacharya Date: Mon, 11 Jan 2016 02:22:55 +0530 Subject: [PATCH] More checks in test backend_state_1 --- tests/test_gui/test_gui.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_gui/test_gui.py b/tests/test_gui/test_gui.py index 0011767..7d71829 100644 --- a/tests/test_gui/test_gui.py +++ b/tests/test_gui/test_gui.py @@ -6,6 +6,7 @@ from mock import patch, MagicMock import redis import pytest import os.path +import datetime from ..utils_test import reload_2_3 @@ -173,6 +174,7 @@ class TestBackendState(object): # setup state status_plugin.Helpers.on_collectstart(tmpdir.strpath) + status_plugin.Helpers.on_collectend(tmpdir.strpath, ["collect_1", "collect_2"]) # mock app_gui with path fake_app_gui = MagicMock() @@ -185,3 +187,8 @@ class TestBackendState(object): assert tmp_controller.last_state["dir_name_topfolder"] ==\ os.path.basename(tmpdir.strpath) assert tmp_controller.last_state["state"] == "collect" + assert tmp_controller.last_state["last_updated_obj"] <= datetime.datetime.now() + assert tmp_controller.last_state["collect"] == ["collect_1", "collect_2"] + assert tmp_controller.last_state["pass"] == [] + assert tmp_controller.last_state["fail"] == [] + assert tmp_controller.last_state["skip"] == []