"""Tests for certbot_nginx.http_01""" import unittest import shutil import mock import six from acme import challenges from certbot import achallenges from certbot.plugins import common_test from certbot.tests import acme_util from certbot_nginx.obj import Addr from certbot_nginx.tests import util class HttpPerformTest(util.NginxTest): """Test the NginxHttp01 challenge.""" account_key = common_test.AUTH_KEY achalls = [ achallenges.KeyAuthorizationAnnotatedChallenge( challb=acme_util.chall_to_challb( challenges.HTTP01(token=b"kNdwjwOeX0I_A8DXt9Msmg"), "pending"), domain="www.example.com", account_key=account_key), achallenges.KeyAuthorizationAnnotatedChallenge( challb=acme_util.chall_to_challb( challenges.HTTP01( token=b"\xba\xa9\xda?