Exemplo n.º 1
0
    def test_sid_assignment(self):

        # This metadata does not contain SIDs
        metadata = {'PLAY': {'symbol': 'PLAY'}, 'MSFT': {'symbol': 'MSFT'}}

        # Build a finder that is allowed to assign sids
        finder = AssetFinder(metadata=metadata, allow_sid_assignment=True)

        # Verify that Assets were built
        play = finder.retrieve_asset_by_identifier('PLAY')
        self.assertEqual('PLAY', play.symbol)
Exemplo n.º 2
0
    def test_sid_assignment(self):

        # This metadata does not contain SIDs
        metadata = {'PLAY': {'symbol': 'PLAY'},
                    'MSFT': {'symbol': 'MSFT'}}

        # Build a finder that is allowed to assign sids
        finder = AssetFinder(metadata=metadata, allow_sid_assignment=True)

        # Verify that Assets were built
        play = finder.retrieve_asset_by_identifier('PLAY')
        self.assertEqual('PLAY', play.symbol)