def METHOD_NAME(db, settings, client, username, password, file_name):
    client.login(username=username, password=password)
    xml_file = os.path.join(settings.BASE_DIR, 'xml', file_name)
    session = client.session
    session['import_file_name'] = file_name
    session['import_tmpfile_name'] = xml_file
    session.save()
    url = reverse('import')
    response = client.post(url)
    assert response.status_code == status_map['import_post_empty'][username]
    if not password:
        assert response.url.startswith('/account/login/'), response.content