# Path: sam/constants.py
# LDAP = {
#     'connection_string': config.get('LDAP', 'connection_string', default='')
# }
# def enable_local_mode():
# def init_urls():
# def find_url(target):
# def get_navbar(lang):
# 
# Path: sam/models/security/rule_template.py
# def get_all():
# def abs_rule_path(path):
# def get_definition(path, cache={}):
#     def __init__(self, path, yml):
#     def import_yml(self, data):
#     def load_exposed(yml):
#     def load_inclusions(self, yml):
#     def load_action_defaults(yml):
#     def get_exposed(self):
#     def get_action_defaults(self):
#     def get_inclusions(self):
# class RuleTemplate(object):


import os
import yaml
import pytest
from sam import constants
from sam.models.security import rule_template
    format: checkbox
    label: Send email?
    default: 0
  color:
    format: dropdown
    label: Favorite Color
    default: blue
    options:
      - red
      - blue
      - green
actions:
  alert_severity: 8
  alert_label: Special Label
  email_address: abc@zyx.com
  email_subject: "[SAM] Special Email Subject"
  sms_number: 1 123 456 7890
  sms_message: "[SAM] Special SMS Message"
subject: src
when: src host $source_ip and dst host $dest_ip and dst port $port
"""


def get_test_rule_template():
    """
     :rtype: rule_template.RuleTemplate
    """
    global dummy_yml
    data = yaml.load(dummy_yml)
    base_path = os.path.dirname(rule_template.__file__)

# Path: sam/constants.py
# LDAP = {
#     'connection_string': config.get('LDAP', 'connection_string', default='')
# }
# def enable_local_mode():
# def init_urls():
# def find_url(target):
# def get_navbar(lang):
# 
# Path: sam/models/security/rule_template.py
# def get_all():
# def abs_rule_path(path):
# def get_definition(path, cache={}):
#     def __init__(self, path, yml):
#     def import_yml(self, data):
#     def load_exposed(yml):
#     def load_inclusions(self, yml):
#     def load_action_defaults(yml):
#     def get_exposed(self):
#     def get_action_defaults(self):
#     def get_inclusions(self):
# class RuleTemplate(object):


# Path: spec/python/models/security/test_rule_template.py
import os
import yaml
import pytest
from sam import constants
from sam.models.security import rule_template

    format: checkbox
    label: Send email?
    default: 0
  color:
    format: dropdown
    label: Favorite Color
    default: blue
    options:
      - red
      - blue
      - green
actions:
  alert_severity: 8
  alert_label: Special Label
  email_address: abc@zyx.com
  email_subject: "[SAM] Special Email Subject"
  sms_number: 1 123 456 7890
  sms_message: "[SAM] Special SMS Message"
subject: src
when: src host $source_ip and dst host $dest_ip and dst port $port
"""


def get_test_rule_template():
    """
     :rtype: rule_template.RuleTemplate
    """
    global dummy_yml
    data = yaml.load(dummy_yml)
    base_path = os.path.dirname(rule_template.__file__)

    rule_path = os.path.join(base_path, os.path.pardir, constants.templates_folder)