def test_collection_when_collection(self, c_mock, r_mock, tc_mock): c_mock.return_value = True r_mock.return_value = False tcs = ["a", "b"] tc_mock.return_value = tcs ansible = Ansible() self.assertTrue(ansible.is_ansible()) self.assertEqual(ansible.get_tox_cases()[:-1], tcs)
def test_collection_when_is_collection(self, c_mock, r_mock): c_mock.return_value = False r_mock.return_value = False ansible = Ansible() self.assertFalse(ansible.is_ansible()) self.assertEqual(len(ansible.get_tox_cases()), 1)