示例#1
0
def test_urllists(db) -> None:
    account, created = Account.objects.all().get_or_create(name="test")

    settings = {
        "filters": {
            "web": {
                "visible": True
            },
            "web_legacy": {
                "visible": True
            },
            "mail": {
                "visible": True
            },
            "mail_legacy": {
                "visible": True
            },
        }
    }
    save_report_settings(account, settings)
    retrieved_settings = get_report_settings(account)

    assert retrieved_settings['data'] == settings['filters']
示例#2
0
def get_report_settings_(request) -> JsonResponse:
    return JsonResponse(get_report_settings(get_account(request)))