def tearDown(self): # Tear down PubSub test_utils.cleanup_topics(self.pub_client, [self.input_topic]) test_utils.cleanup_subscriptions(self.sub_client, [self.input_sub]) # Tear down BigQuery utils.delete_bq_dataset(self.project, self.dataset_ref)
def _cleanup_pubsub(self): test_utils.cleanup_subscriptions(self.sub_client, [self.input_sub]) test_utils.cleanup_topics(self.pub_client, [self.input_topic])
def tearDown(self): """Delete all created topics and subs.""" test_utils.cleanup_subscriptions( self.sub_client, [self.input_sub, self.output_sub]) test_utils.cleanup_topics( self.pub_client, [self.input_topic, self.output_topic])
def test_cleanup_topics(self): mock_topics = mock.MagicMock() mock_topics.exist.return_value = True utils.cleanup_subscriptions([mock_topics]) self.assertTrue(mock_topics.delete.called)
def tearDown(self): test_utils.cleanup_subscriptions(self.sub_client, [self.input_sub, self.output_sub]) test_utils.cleanup_topics(self.pub_client, [self.input_topic, self.output_topic])
def tearDown(self): super(GroupByKeyStreamingTest, self).tearDown() test_utils.cleanup_subscriptions(self.sub_client, [self.input_sub, self.output_sub]) test_utils.cleanup_topics(self.pub_client, [self.input_topic, self.output_topic])
def tearDown(self): test_utils.cleanup_subscriptions(self.sub_client, [self.input_sub, self.output_sub]) test_utils.cleanup_topics(self.pub_client, [self.input_topic, self.output_topic])
def _cleanup_pubsub(self): test_utils.cleanup_subscriptions([self.input_sub]) test_utils.cleanup_topics([self.input_topic])
def test_cleanup_subscriptions(self): sub_client = mock.Mock() sub = mock.Mock() sub.name = 'test_sub' utils.cleanup_subscriptions(sub_client, [sub]) sub_client.delete_subscription.assert_called_with(sub.name)
def _cleanup_pubsub(self): test_utils.cleanup_subscriptions([self.input_sub, self.output_sub]) test_utils.cleanup_topics([self.input_topic, self.output_topic])
def test_cleanup_subscriptions(self): sub_client = mock.Mock() sub = mock.Mock() sub.name = 'test_sub' utils.cleanup_subscriptions(sub_client, [sub]) sub_client.delete_subscription.assert_called_with(sub.name)