Example #1
0
  def test_display_data_no_subscription(self):
    source = _PubSubPayloadSource('projects/fakeprj/topics/a_topic')
    dd = DisplayData.create_from(source)
    expected_items = [
        DisplayDataItemMatcher('topic', 'projects/fakeprj/topics/a_topic')]

    hc.assert_that(dd.items, hc.contains_inanyorder(*expected_items))
Example #2
0
    def test_display_data_no_subscription(self):
        source = _PubSubPayloadSource('projects/fakeprj/topics/a_topic')
        dd = DisplayData.create_from(source)
        expected_items = [
            DisplayDataItemMatcher('topic', 'projects/fakeprj/topics/a_topic')
        ]

        hc.assert_that(dd.items, hc.contains_inanyorder(*expected_items))
Example #3
0
  def test_display_data(self):
    source = _PubSubPayloadSource('a_topic', 'a_subscription', 'a_label')
    dd = DisplayData.create_from(source)
    expected_items = [
        DisplayDataItemMatcher('topic', 'a_topic'),
        DisplayDataItemMatcher('subscription', 'a_subscription'),
        DisplayDataItemMatcher('id_label', 'a_label')]

    hc.assert_that(dd.items, hc.contains_inanyorder(*expected_items))
Example #4
0
    def test_display_data(self):
        source = _PubSubPayloadSource('a_topic', 'a_subscription', 'a_label')
        dd = DisplayData.create_from(source)
        expected_items = [
            DisplayDataItemMatcher('topic', 'a_topic'),
            DisplayDataItemMatcher('subscription', 'a_subscription'),
            DisplayDataItemMatcher('id_label', 'a_label')
        ]

        hc.assert_that(dd.items, hc.contains_inanyorder(*expected_items))