示例#1
0
 def test_startswith(self):
     """
     Startswith
     """
     start_path = reverse('events:events')
     path1 = reverse('events:events')
     self.assertTrue(startswith(path1, start_path))
     path2 = reverse('events:events', kwargs={'mode': 'popular'})
     self.assertTrue(startswith(path2, start_path))
     path3 = reverse('events:events', kwargs={'mode': 'latest'})
     self.assertTrue(startswith(path3, start_path))
     path4 = reverse('events:events', kwargs={'mode': 'changed'})
     self.assertTrue(startswith(path4, start_path))
     path5 = reverse('events:events', kwargs={'mode': 'last-minute'})
     self.assertTrue(startswith(path5, start_path))
示例#2
0
 def test_startswith(self):
     """
     Startswith
     """
     start_path = reverse('accounts:rank')
     path = reverse('accounts:rank')
     self.assertTrue(startswith(path, start_path))
示例#3
0
 def test_startswith(self):
     """
     Startswith
     """
     start_path = reverse('accounts:rank')
     path = reverse('accounts:rank')
     self.assertTrue(startswith(path, start_path))