4
def finish_setup(unit, user='admin', password=None):
5
h = {'User-Agent': 'Mozilla/5.0 Gecko/20100101 Firefox/12.0',
6
'Content-Type': 'application/x-www-form-urlencoded',
7
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*',
8
'Accept-Encoding': 'gzip, deflate'}
10
r = requests.post('http://%s/wp-admin/install.php?step=2' % unit,
11
headers=h, data={'weblog_title': 'Amulet Test %s' % unit,
12
'user_name': user, 'admin_password': password,
13
'admin_email': 'test@example.tld',
14
'admin_password2': password,
15
'Submit': 'Install WordPress'}, proxies=None)