def test_get_domains(): moga = Admin(TRACKERS) try: moga.create_domain(DOMAIN) moga.create_class(DOMAIN, CLASS, 2) ret = moga.get_domains() assert DOMAIN in ret assert CLASS in ret[DOMAIN], ret assert ret[DOMAIN][CLASS] == 2, ret finally: moga.delete_domain(DOMAIN)
def test_create_class(): moga = Admin(TRACKERS) moga.create_domain(DOMAIN) moga.create_class(DOMAIN, CLASS, 2) moga.delete_class(DOMAIN, CLASS)