def setUp(self): self.test_model = ServiceTypeAdapter.sample_model('service1') ServiceTypeAdapter.create_table() PlanAdapter.create_table() PlanServiceTypeAdapter.create_table() _, self.result = SQLStore.add_service(self.test_model)
def test_add_service_existing(self, mock_exists): mock_exists.return_value = True _, result = SQLStore.add_service(self.test_model) self.assertEqual(result, 409, msg='Assert Service Already Exists')