Skip to content

Commit

Permalink
Fix captcha extension API key duplication during tests
Browse files Browse the repository at this point in the history
  • Loading branch information
david96182 committed May 22, 2024
1 parent da8d5a4 commit bf2493c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const defaultConfig = {
// API key
apiKey: '',
apiKey: 'test_key',

// Your Developer appId, Apply in dashboard's developer section
appId: '',
Expand Down
14 changes: 7 additions & 7 deletions ninjemail/tests/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def mock_chrome_quit(self):

def test_create_outlook_account():

manager = Ninjemail(browser='chrome', captcha_keys={'capsolver': {'token': 'aaaaaaaa'}})
manager = Ninjemail(browser='chrome', captcha_keys={'capsolver': 'token'})
username, password = manager.create_outlook_account(
username="testuser",
password="testpassword",
Expand All @@ -157,7 +157,7 @@ def test_create_outlook_account():

def test_create_outlook_account_no_info():

manager = Ninjemail(browser='chrome', captcha_keys={'capsolver': {'token': 'aaaaaaaa'}})
manager = Ninjemail(browser='chrome', captcha_keys={'capsolver': 'token'})
username, password = manager.create_outlook_account(
)

Expand All @@ -166,7 +166,7 @@ def test_create_outlook_account_no_info():

def test_create_outlook_account_with_proxy():

manager = Ninjemail(browser='chrome', captcha_keys={'capsolver': {'token': 'aaaaaaaa'}}, proxies=['http://127.0.0.1:8080'])
manager = Ninjemail(browser='chrome', captcha_keys={'capsolver': 'token'}, proxies=['http://127.0.0.1:8080'])
username, password = manager.create_outlook_account(
)

Expand Down Expand Up @@ -236,7 +236,7 @@ def test_create_gmail_account_no_sms_key():

def test_create_yahoo_account():

manager = Ninjemail(browser='chrome', captcha_keys={'capsolver': {'token': 'aaaaaaaa'}},
manager = Ninjemail(browser='chrome', captcha_keys={'capsolver': 'token'},
sms_keys={'smspool': {'token': 'bbbbbb'}})
username, password = manager.create_yahoo_account(
username="testuser",
Expand All @@ -251,7 +251,7 @@ def test_create_yahoo_account():

def test_create_yahoo_account_no_info():

manager = Ninjemail(browser='chrome', captcha_keys={'capsolver': {'token': 'aaaaaaaa'}},
manager = Ninjemail(browser='chrome', captcha_keys={'capsolver': 'token'},
sms_keys={'smspool': {'token': 'bbbbbb'}})
username, password = manager.create_yahoo_account(
)
Expand All @@ -261,7 +261,7 @@ def test_create_yahoo_account_no_info():

def test_create_yahoo_account_with_proxy():

manager = Ninjemail(browser='chrome', captcha_keys={'capsolver': {'token': 'aaaaaaaa'}},
manager = Ninjemail(browser='chrome', captcha_keys={'capsolver': 'token'},
sms_keys={'smspool': {'token': 'bbbbbb'}}, proxies=['http://127.0.0.1:8080'])
username, password = manager.create_yahoo_account(
)
Expand All @@ -285,7 +285,7 @@ def test_create_yahoo_account_no_captcha_key():

def test_create_yahoo_account_no_sms_key():

manager = Ninjemail(browser='chrome', captcha_keys={'capsolver': {'token': 'aaaaaaaa'}})
manager = Ninjemail(browser='chrome', captcha_keys={'capsolver': 'token'})
with pytest.raises(ValueError) as excinfo:
manager.create_yahoo_account(
username="testuser",
Expand Down

0 comments on commit bf2493c

Please sign in to comment.