Пример #1
0
 def test_make_disallowed(self):
     '''Make an agent that disallows a path.'''
     agent = Agent().disallow('/path')
     self.assertFalse(agent.allowed('/path'))
Пример #2
0
 def test_make_disallowed(self):
     '''Make an agent that disallows a path.'''
     agent = Agent().disallow('/path')
     self.assertFalse(agent.allowed('/path'))
Пример #3
0
 def test_length(self):
     '''An agent knows how many directives it has.'''
     agent = Agent().disallow('/path').allow('/path/')
     self.assertEqual(len(agent), 2)