1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
== Changing a person's profile picture ==
Users can change their profile picture on their Edit page.
Note that we have chosen not to expose the ability to customise a user's icon
or logo.
>>> browser = setupBrowser(auth='Basic mark@example.com:test')
>>> browser.open('http://launchpad.dev/~mark')
>>> browser.url
'http://launchpad.dev/~mark'
>>> browser.getLink('Change details').click()
>>> browser.url
'http://launchpad.dev/~mark/+edit'
>>> find_tag_by_id(browser.contents, 'field.mugshot_current_img').get('src')
u'/@@/person-mugshot'
>>> from lp.testing.branding import set_branding
>>> set_branding(browser, icon=False, logo=False)
>>> browser.getControl('Save Changes').click()
Here we see the updated values.
>>> browser.url
'http://launchpad.dev/~mark'
>>> browser.getLink('Change details').click()
>>> browser.url
'http://launchpad.dev/~mark/+edit'
>>> browser.getControl(name='field.mugshot.action').value
['keep']
>>> find_tag_by_id(browser.contents, 'field.mugshot_current_img').get('src')
u'.../mugshot.png'
|