Changeset 347d11a in trunk


Ignore:
Timestamp:
2022-12-02T08:27:13Z (3 years ago)
Author:
meejah <meejah@…>
Branches:
master
Children:
22a7aac
Parents:
5bc91bb
Message:

fix test, un-log error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/allmydata/test/test_storage_client.py

    r5bc91bb r347d11a  
    7878    SameProcessStreamEndpointAssigner,
    7979    MemoryIntroducerClient,
     80    flush_logged_errors,
    8081)
    8182from .common_web import (
     
    9394    NativeStorageServer,
    9495    StorageFarmBroker,
     96    StorageClientConfig,
     97    MissingPlugin,
    9598    _FoolscapStorage,
    9699    _NullStorage,
     
    160163
    161164
    162 class UnrecognizedAnnouncement(SyncTestCase):
     165class UnrecognizedAnnouncement(unittest.TestCase):
    163166    """
    164167    Tests for handling of announcements that aren't recognized and don't use
     
    184187        return Service()
    185188
    186     def native_storage_server(self):
     189    def native_storage_server(self, config=None):
    187190        """
    188191        Make a ``NativeStorageServer`` out of an unrecognizable announcement.
     
    193196            self._tub_maker,
    194197            {},
    195             EMPTY_CLIENT_CONFIG,
     198            node_config=EMPTY_CLIENT_CONFIG,
     199            config=config or StorageClientConfig(),
    196200        )
    197201
     
    244248        ``NativeStorageServer.get_longname`` describes the missing plugin.
    245249        """
    246         server = self.native_storage_server()
    247         self.assertThat(
     250        server = self.native_storage_server(
     251            StorageClientConfig(
     252                storage_plugins={
     253                    "nothing": {}
     254                }
     255            )
     256        )
     257        self.assertEqual(
    248258            server.get_longname(),
    249             Equals('<missing plugin "{}">'.format(self.plugin_name)),
    250         )
     259            '<missing plugin "nothing">',
     260        )
     261        self.flushLoggedErrors(MissingPlugin)
    251262
    252263
Note: See TracChangeset for help on using the changeset viewer.