def test_make_disallowed(self): '''Make an agent that disallows a path.''' agent = Agent().disallow('/path') self.assertFalse(agent.allowed('/path'))
def test_length(self): '''An agent knows how many directives it has.''' agent = Agent().disallow('/path').allow('/path/') self.assertEqual(len(agent), 2)