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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
Answer Contact Report
=====================
To view the answer contact report for a given person, the user chooses
the 'Answer Contact For' link from the actions portlet while viewing
the Person's page.
>>> anon_browser.open('http://answers.launchpad.dev/~no-priv')
>>> anon_browser.getLink('Answer contact for').click()
>>> print anon_browser.title
Projects for which...
Since No Privileges Person is not an answer contact, the report states
that.
>>> content = find_main_content(anon_browser.contents)
>>> print content.find('p').renderContents()
No Privileges Person is not an answer contact for any project.
But when the person is an answer contact, the page displays the project
he registered for.
>>> anon_browser.open('http://answers.launchpad.dev/~name16')
>>> anon_browser.getLink('Answer contact for').click()
>>> print anon_browser.title
Projects for which...
>>> content = find_tag_by_id(
... anon_browser.contents, "direct-answer-contacts-for-list")
>>> print extract_text(content).encode('ascii', 'backslashreplace')
Gnome Baker
...mozilla-firefox... package in Ubuntu
>>> content = find_tag_by_id(
... anon_browser.contents, "team-answer-contacts-for-list")
>>> print extract_text(content)
Gnome Baker
The Gnome Panel Applets
Clicking on the name of the project will show the project answers.
>>> anon_browser.getLink('Gnome Baker').click()
>>> print anon_browser.title
Questions : gnomebaker
When the user is logged in, and he is visiting this page in his profile
he will see a link after each project to manage his registration.
>>> browser.addHeader('Authorization', 'Basic test@canonical.com:test')
>>> browser.open(
... 'http://answers.launchpad.dev/~name12')
>>> browser.getLink('Answer contact for').click()
>>> print browser.title
Projects for which...
>>> content = find_tag_by_id(
... browser.contents, "team-answer-contacts-for-list")
>>> print extract_text(content)
Gnome Baker Unsubscribe team
The Gnome Panel Applets Unsubscribe team
>>> browser.getLink(id="gnomebaker-setteamanswercontact").click()
>>> print browser.title
Answer contact for...
The Remove yourself/team links only appears in his profile. He cannot
see the link for other users
>>> browser.open(
... 'http://answers.launchpad.dev/~name16')
>>> browser.getLink('Answer contact for').click()
>>> print browser.title
Projects for which...
>>> content = find_tag_by_id(
... browser.contents, "direct-answer-contacts-for-list")
>>> print extract_text(content).encode('ascii', 'backslashreplace')
Gnome Baker
...mozilla-firefox... package in Ubuntu
|