def make_fake_policy(): p = Policy() p.policy_id = '123456' p.payor_id = '1234567' p.group_id = '1234567' p.group_name = fake.company() + ' ' + fake.company_suffix() p.effective_start = fake.date() p.effective_end = fake.date() p.is_in_effect = fake.boolean() return p
def get_policy(policy_id): return Policy.objects(pk=policy_id).to_json()