Beispiel #1
0
    def test_reject(self):
        f = TweetsWithHashtagsPredicate()

        tweet = {
            "entities": {
                "hashtags": []
            }
        }

        assert_false(f.test(tweet))
Beispiel #2
0
    def test_accept(self):
        f = TweetsWithHashtagsPredicate()

        tweet = {
            "entities": {
                "hashtags": [
                    {
                        "indices": [
                            70,
                            82
                        ],
                        "text": "testhashtag"
                    }
                ]
            }
        }

        assert_true(f.test(tweet))