Skip to content

Commit

Permalink
updated tests & readthedocs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Álvaro Bartolomé del Canto committed Aug 14, 2019
1 parent 8e83201 commit 75c51ca
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 6 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,4 @@ venv.bak/
# PyCharm default idea folder
.idea
.idea/
.idea/*

# Private Test File with Twitter Credentials
tests/test_private.py
.idea/*
6 changes: 4 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
# The full version, including alpha/beta/rc tags
release = '0.1'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon'
'sphinx.ext.napoleon',
'recommonmark'
]

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -55,3 +55,5 @@
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

master_doc = 'index'
46 changes: 46 additions & 0 deletions tests/test_private.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

__author__ = 'Alvaro Bartolome @ alvarob96 on GitHub'
__version__ = '0.1'

import pytest

from twipper.credentials import Twipper


def test_credentials():
credentials = Twipper(consumer_key='4mfeYj9SH1PXsff5HgZ5bTOzW',
consumer_secret='aiEfkE5tYCKcKEg42OcHbNgVvA2uikwwpRuBYwl5VmGSAm7N7e',
access_token='254490342-xIGPeyGYLDyD1uFIVgybDsd9ImUPaz467kowIoem',
access_token_secret='JrEuYnm1s44JR46AQDdoJagee3Uw9Ip0jxlp7z3XFcPDg')

credentials.plan = 'fullarchive'
print(credentials.plan)
credentials.label = 'research'
print(credentials.label)

credentials.close()

# api = credentials.get_api()
# auth = credentials.get_oauth()
#
# try:
# tweets = stream_country_tweets(api=api,
# auth=auth,
# country='spain',
# language='es',
# filter_retweets=False,
# tweet_limit=10,
# retry='no_limit') # after cleaning maybe some are empty or invalid
# except:
# credentials.close()
#
# credentials.close()
#
# for tweet in tweets:
# print(tweet)


if __name__ == '__main__':
test_credentials()

0 comments on commit 75c51ca

Please sign in to comment.