To test Backend crawling sequences you can use the
BackendSequenceTest class.

BackendSequenceTest class will run a complete crawl of the passed
site graphs and return the sequence used by the backend for visiting the different pages.

Let’s say you want to test to a backend that sort pages using alphabetic order.
You can define the following test:

classTestAlphabeticSortBackend(backends.BackendSequenceTest):backend_class='frontera.contrib.backend.abackend.AlphabeticSortBackend'SITE_LIST=[[('C',[]),('B',[]),('A',[]),],]deftest_one(self):# Check sequence is the expected oneself.assert_sequence(site_list=self.SITE_LIST,expected_sequence=['A','B','C'],max_next_requests=0)deftest_two(self):# Get sequence and work with itsequence=self.get_sequence(site_list=SITE_LIST,max_next_requests=0)assertlen(sequence)>2...