Beispiel #1
0
def _assert_asmt(asmts_ui_service, exp_asmt, is_cas_check_required=False):
    """Assert that assessment `exp_asmt` on UI is the same as in
  `exp_asmt`."""
    # "audit" not shown in UI
    # "custom_attributes" not returned on POST /api/assessments
    actual_asmt = asmts_ui_service.get_obj_from_info_page(exp_asmt)
    if is_cas_check_required:
        base.Test().general_equal_assert(exp_asmt.repr_ui(), actual_asmt,
                                         "audit")
    else:
        base.Test().general_equal_assert(exp_asmt.repr_ui(), actual_asmt,
                                         "audit", "custom_attributes")
def _assert_asmt(asmts_ui_service, exp_asmt):
  """Assert that assessment `exp_asmt` on UI is the same as in
  `exp_asmt`."""
  # "audit" not shown in UI
  actual_asmt = asmts_ui_service.get_obj_from_info_page(exp_asmt)
  exp_asmt.repr_ui()
  base.Test().general_equal_assert(exp_asmt, actual_asmt, "audit")
 def check_ggrc_6592_7562(cls, login_user, condition):
     """Check if it is xfail because of GGRC-6591(about proposal_creator) or
 GGRC-7562(about obj_creator) or fail."""
     if login_user in ["proposal_creator", "obj_creator"]:
         base.Test().check_xfail_or_fail(
             condition, "Issue GGRC-6592\n",
             "There are no proposals in the list from ui.")
def _assert_asmt(asmts_ui_service, exp_asmt):
    """Assert that assessment `exp_asmt` on UI is the same as in
  `exp_asmt`."""
    actual_asmt = asmts_ui_service.get_obj_from_info_page(exp_asmt)
    base.Test().general_equal_assert(
        exp_asmt.repr_ui(),
        actual_asmt,
        "audit",  # not shown in UI
        "custom_attributes")  # not returned on POST /api/assessments)
Beispiel #5
0
 def check_ggrc_6591(cls, login_user, condition):
     """Check if it is xfail because of GGRC-6591 or fail."""
     if login_user == "proposal_creator":
         base.Test().check_xfail_or_fail(
             condition, "Issue GGRC-6591\n",
             "There are no proposals in the list from ui.")