Fixes some indentation in chrome module
This commit is contained in:
parent
c7cea3d278
commit
0b0b5c92b8
|
@ -9,7 +9,7 @@ class Chrome:
|
||||||
def search(urls, config_folder_path):
|
def search(urls, config_folder_path):
|
||||||
Chrome.setup(config_folder_path)
|
Chrome.setup(config_folder_path)
|
||||||
conn = sqlite3.connect('/tmp/hackertray.chrome')
|
conn = sqlite3.connect('/tmp/hackertray.chrome')
|
||||||
db = conn.cursor()
|
db = conn.cursor()
|
||||||
result = []
|
result = []
|
||||||
for url in urls:
|
for url in urls:
|
||||||
db_result = db.execute('SELECT url from urls WHERE url=:url',{"url":url})
|
db_result = db.execute('SELECT url from urls WHERE url=:url',{"url":url})
|
||||||
|
|
|
@ -5,11 +5,11 @@ from hackertray import Chrome
|
||||||
|
|
||||||
class ChromeTest(unittest.TestCase):
|
class ChromeTest(unittest.TestCase):
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
config_folder_path = os.getcwd()+'/test/'
|
config_folder_path = os.getcwd()+'/test/'
|
||||||
data = Chrome.search([
|
data = Chrome.search([
|
||||||
"https://github.com/",
|
"https://github.com/",
|
||||||
"https://news.ycombinator.com/",
|
"https://news.ycombinator.com/",
|
||||||
"https://github.com/captn3m0/hackertray",
|
"https://github.com/captn3m0/hackertray",
|
||||||
"http://invalid_url/"],
|
"http://invalid_url/"],
|
||||||
config_folder_path)
|
config_folder_path)
|
||||||
self.assertTrue(data == [True,True,True,False])
|
self.assertTrue(data == [True,True,True,False])
|
Loading…
Reference in New Issue