135
135
RobotTest(7, doc, good, bad)
137
# From Google: http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=40364
141
User-agent: Googlebot
142
Allow: /folder1/myfile.html
146
good = ['/folder1/myfile.html']
147
bad = ['/folder1/anotherfile.html']
149
RobotTest(8, doc, good, bad, agent="Googlebot")
151
# 9. This file is incorrect because "Googlebot" is a substring of
152
# "Googlebot-Mobile", so test 10 works just like test 9.
154
User-agent: Googlebot
157
User-agent: Googlebot-Mobile
162
bad = ['/something.jpg']
164
RobotTest(9, doc, good, bad, agent="Googlebot")
167
bad = ['/something.jpg']
169
RobotTest(10, doc, good, bad, agent="Googlebot-Mobile")
171
# 11. Get the order correct.
173
User-agent: Googlebot-Mobile
176
User-agent: Googlebot
181
bad = ['/something.jpg']
183
RobotTest(11, doc, good, bad, agent="Googlebot")
185
good = ['/something.jpg']
188
RobotTest(12, doc, good, bad, agent="Googlebot-Mobile")
191
# 13. Google also got the order wrong in #8. You need to specify the
192
# URLs from more specific to more general.
194
User-agent: Googlebot
195
Allow: /folder1/myfile.html
199
good = ['/folder1/myfile.html']
200
bad = ['/folder1/anotherfile.html']
202
RobotTest(13, doc, good, bad, agent="googlebot")
137
206
class TestCase(unittest.TestCase):
138
207
def runTest(self):
139
208
test_support.requires('network')