示例#1
0
 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)
示例#2
0
 def _cleanup_pubsub(self):
     test_utils.cleanup_subscriptions(self.sub_client, [self.input_sub])
     test_utils.cleanup_topics(self.pub_client, [self.input_topic])
示例#3
0
 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 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])
示例#5
0
 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])
示例#8
0
 def test_cleanup_topics(self):
     pub_client = mock.Mock()
     topic = mock.Mock()
     topic.name = 'test_topic'
     utils.cleanup_topics(pub_client, [topic])
     pub_client.delete_topic.assert_called_with(topic.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_topics(self):
   pub_client = mock.Mock()
   topic = mock.Mock()
   topic.name = 'test_topic'
   utils.cleanup_topics(pub_client, [topic])
   pub_client.delete_topic.assert_called_with(topic.name)