diff --git a/sdks/python/apache_beam/transforms/display_test.py b/sdks/python/apache_beam/transforms/display_test.py index 7d67c556eb74..840fc6d581bd 100644 --- a/sdks/python/apache_beam/transforms/display_test.py +++ b/sdks/python/apache_beam/transforms/display_test.py @@ -151,7 +151,7 @@ def _add_argparse_args(cls, parser): 'RuntimeValueProvider(option: float_flag,' ' type: float, default_value: None)') ] - hc.assert_that(items, hc.contains_inanyorder(*expected_items)) + hc.assert_that(items, hc.has_items(*expected_items)) def test_create_list_display_data(self): flags = ['--extra_package', 'package1', '--extra_package', 'package2'] @@ -159,7 +159,7 @@ def test_create_list_display_data(self): items = DisplayData.create_from_options(pipeline_options).items hc.assert_that( items, - hc.contains_inanyorder( + hc.has_items( DisplayDataItemMatcher( 'extra_packages', str(['package1', 'package2'])))) @@ -219,7 +219,7 @@ def display_data(self): key='static_string', value='static me!', namespace=nspace) ] - hc.assert_that(dd.items, hc.contains_inanyorder(*expected_items)) + hc.assert_that(dd.items, hc.has_items(*expected_items)) def test_drop_if_none(self): class MyDoFn(beam.DoFn): @@ -236,7 +236,7 @@ def display_data(self): DisplayDataItemMatcher('some_val', 'something'), DisplayDataItemMatcher('nodef_val', True) ] - hc.assert_that(dd.items, hc.contains_inanyorder(*expected_items)) + hc.assert_that(dd.items, hc.has_items(*expected_items)) def test_subcomponent(self): class SpecialDoFn(beam.DoFn): @@ -253,7 +253,7 @@ def display_data(self): DisplayDataItemMatcher('fn', SpecialDoFn, pardo_nspace) ] - hc.assert_that(dd.items, hc.contains_inanyorder(*expected_items)) + hc.assert_that(dd.items, hc.has_items(*expected_items)) # TODO: Test __repr__ function