#!/usr/bin/python

import unittest

import parent
from testlib import *
from fmf_metadata import FMF, generic_metadata_setter, FMF_ATTR_PREFIX

@FMF.tag("example", post_mark="+")
@skipPackage("example")
@skipImage("Do not test BaseOS packages", "rhel-8-3-distropkg", "rhel-8-4-distropkg")
@FMF.adjust({"when": "distro > Fedora-33", "enabled": True})
class Test1(MachineCase):

    @nondestructive
    def testNonDestructiveKW(self):
        pass

    @FMF.tag("tier2", post_mark="+")
    def testTagExtensionPost(self):
        pass

    @FMF.summary("This is nondestructive test")
    @FMF.description("it just show first page after login page")
    def testSummaryTag(self):
        pass

    @FMF.adjust({"when": "distro ~< centos-6", "enabled": False})
    def testAdjust(self):
        pass

    def testSummaryDOCstr(self):
        """
        Basic test of cockpit login abilities

        It show system page after login
        """
        pass

    @FMF.tier("tier1")
    def testDynamicFMFattr(self):
        pass


@FMF.tag("example")
@FMF.link("url://link", {"dependson": "url://link4"})
class TestLinks(unittest.TestCase):

    @FMF.bug("url://link2")
    def testOne(self):
        self.assertTrue(True)

    @FMF.link("url://link3")
    def testThree(self):
        self.assertTrue(True)

@generic_metadata_setter(FMF_ATTR_PREFIX + "adjust", [{"a": "b"}], base_type=dict)
@generic_metadata_setter(FMF_ATTR_PREFIX + "adjust", [{"b": "d"}], base_type=dict)
class TestDictMerge(unittest.TestCase):

    @generic_metadata_setter(FMF_ATTR_PREFIX + "adjust", [{"a": "c"}], base_type=dict)
    @generic_metadata_setter(FMF_ATTR_PREFIX + "adjust", [{"x": "y"}], base_type=dict)
    def test(self):
        self.assertTrue(True)