Commit 071a4caa authored by Your Name's avatar Your Name

fix test to tests

parent 7ae5962f
...@@ -2,6 +2,7 @@ from flask import Flask ...@@ -2,6 +2,7 @@ from flask import Flask
from flask_cors import CORS from flask_cors import CORS
from requests_oauthlib import OAuth1Session, OAuth2Session from requests_oauthlib import OAuth1Session, OAuth2Session
import os import os
import time
app = Flask(__name__) app = Flask(__name__)
CORS(app) CORS(app)
...@@ -20,6 +21,7 @@ def shadowban(screen_name): ...@@ -20,6 +21,7 @@ def shadowban(screen_name):
@app.route("/<screen_name>") @app.route("/<screen_name>")
def searchban(screen_name): def searchban(screen_name):
returnjson = { returnjson = {
"timestamp": time.time(),
"profile": { "profile": {
# "id": "7080152", # "id": "7080152",
# "screenName": "TwitterJP", # "screenName": "TwitterJP",
...@@ -36,6 +38,8 @@ def searchban(screen_name): ...@@ -36,6 +38,8 @@ def searchban(screen_name):
# "reply": {"ban": False, "tweet": "1480819689898987523", "in_reply_to": "1369626114381901828"} # "reply": {"ban": False, "tweet": "1480819689898987523", "in_reply_to": "1369626114381901828"}
# } # }
} }
# twitter = OAuth1Session(TWITTER_IPHONE_CK, TWITTER_IPHONE_CS) # twitter = OAuth1Session(TWITTER_IPHONE_CK, TWITTER_IPHONE_CS)
twitter_b = OAuth2Session() twitter_b = OAuth2Session()
twitter_b.headers["Authorization"] = "Bearer {}".format(TWITTER_AUTH_KEY) twitter_b.headers["Authorization"] = "Bearer {}".format(TWITTER_AUTH_KEY)
...@@ -117,7 +121,7 @@ def searchban(screen_name): ...@@ -117,7 +121,7 @@ def searchban(screen_name):
# else: # else:
# returnjson["profile"]["has_tweets"] = True # returnjson["profile"]["has_tweets"] = True
returnjson["test"] = { returnjson["tests"] = {
"search": "ok", "search": "ok",
"typeahead": True, ## suggest ban "typeahead": True, ## suggest ban
"ghost": {"ban": True}, "ghost": {"ban": True},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment