Skip to content

Commit b762ea8

Browse files
author
Xavier Grangier
committed
grangier#188 - move tweets tests case
1 parent 0e6a771 commit b762ea8

File tree

4 files changed

+33
-9
lines changed

4 files changed

+33
-9
lines changed
File renamed without changes.
File renamed without changes.

tests/extractors/content.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -424,15 +424,6 @@ def extract(self, instance):
424424
return article
425425

426426

427-
class TestArticleTweet(TestExtractionBase):
428-
429-
def test_tweet(self):
430-
article = self.getArticle()
431-
number_tweets = len(article.tweets)
432-
expected_number_tweets = self.data['expected']['tweets']
433-
self.assertEqual(number_tweets, expected_number_tweets)
434-
435-
436427
class TestArticleLinks(TestExtractionBase):
437428

438429
def test_links(self):

tests/extractors/tweets.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# -*- coding: utf-8 -*-
2+
"""\
3+
This is a python port of "Goose" orignialy licensed to Gravity.com
4+
under one or more contributor license agreements. See the NOTICE file
5+
distributed with this work for additional information
6+
regarding copyright ownership.
7+
8+
Python port was written by Xavier Grangier for Recrutae
9+
10+
Gravity.com licenses this file
11+
to you under the Apache License, Version 2.0 (the "License");
12+
you may not use this file except in compliance
13+
with the License. You may obtain a copy of the License at
14+
15+
http://www.apache.org/licenses/LICENSE-2.0
16+
17+
Unless required by applicable law or agreed to in writing, software
18+
distributed under the License is distributed on an "AS IS" BASIS,
19+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20+
See the License for the specific language governing permissions and
21+
limitations under the License.
22+
"""
23+
24+
from base import TestExtractionBase
25+
26+
27+
class TestArticleTweet(TestExtractionBase):
28+
29+
def test_tweet(self):
30+
article = self.getArticle()
31+
number_tweets = len(article.tweets)
32+
expected_number_tweets = self.data['expected']['tweets']
33+
self.assertEqual(number_tweets, expected_number_tweets)

0 commit comments

Comments
 (0)