def test_can_return_model_as_best_assembly(self, mock_best): mock_best.return_value = None f = File() f._models = "ABCDEF" model = f.generate_best_assembly() self.assertEqual(model, "A")
def test_can_generate_best_assembly(self, mock_best, mock_model): f = File() mock_best.return_value = {"delta_energy": -60, "id": 2} model = f.generate_best_assembly() self.assertIs(model, mock_model.return_value) mock_model.assert_called_with(2)