Exemplo n.º 1
0
 def test_finds_action_only_for_given_model(self):
     files_only = filteractions.find_actions('qualitio.filter.tests.testapp', model=models.File)
     assert ChangeFileParent in files_only, '%s should be in actions' % ChangeFileParent
     assert ChangeDirectoryParent not in files_only, '%s SHOULDN\'T be in actions' % ChangeDirectoryParent
Exemplo n.º 2
0
 def test_finds_all_actions(self):
     actions = filteractions.find_actions('qualitio.filter.tests.testapp')
     assert ChangeFileParent in actions, '%s should be in actions' % ChangeFileParent
     assert ChangeDirectoryParent in actions, '%s should be in actions' % ChangeDirectoryParent