def test_callbacksCalled(self):
        """
        The correct callbacks fire, and that *only* those fire.
        """
        sentencesByType = {
            'GPGGA': [b'$GPGGA*56'],
            'GPGLL': [b'$GPGLL*50'],
            'GPGSA': [b'$GPGSA*42'],
            'GPGSV': [b'$GPGSV*55'],
            'GPHDT': [b'$GPHDT*4f'],
            'GPRMC': [b'$GPRMC*4b']
        }

        for sentenceType, sentences in iteritems(sentencesByType):
            for sentence in sentences:
                self.protocol.lineReceived(sentence)
                self.assertEqual(self.sentenceTypes, set([sentenceType]))
                self.sentenceTypes.clear()

        The correct callbacks fire, and that *only* those fire.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/positioning/test/test_nmea.py