def test_reply_domain_mismatch(): """Check if the generated query really do not match on any other domain""" annotation = {"parent": {"user": "******"}} query = notifier.generate_system_reply_query("testuser", "testdomain") assert FilterHandler(query).match(annotation, "create") is False
def test_reply_username_mismatch(): """Check if the generated query requires the domain to match.""" annotation = {"parent": {"user": "******"}} query = notifier.generate_system_reply_query("testuser", "testdomain") assert FilterHandler(query).match(annotation, "create") is False
def test_reply_query_match(): """Check if the generated query really matches on the parent annotation user""" annotation = {"parent": {"user": "******"}} query = notifier.generate_system_reply_query("testuser", "testdomain") assert FilterHandler(query).match(annotation, "create") is True
def test_reply_domain_mismatch(): """Check if the generated query really do not match on any other domain""" annotation = {'parent': {'user': '******'}} query = notifier.generate_system_reply_query('testuser', 'testdomain') assert FilterHandler(query).match(annotation, 'create') is False
def test_reply_username_mismatch(): """Check if the generated query requires the domain to match.""" annotation = {'parent': {'user': '******'}} query = notifier.generate_system_reply_query('testuser', 'testdomain') assert FilterHandler(query).match(annotation, 'create') is False
def test_reply_query_match(): """Check if the generated query really matches on the parent annotation user""" annotation = {'parent': {'user': '******'}} query = notifier.generate_system_reply_query('testuser', 'testdomain') assert FilterHandler(query).match(annotation, 'create') is True