question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

python3 -m unittest tests.all --verbose occurs errors without changes

See original GitHub issue

Envs

$ python3 --version
Python 3.7.3

Error Log

$ python3 -m unittest tests.all --verbose                                                                                                                                                  
test_detect_false_via_message (tests.all.SherlockDetectTests)                                                                                                                                               
Test Username Does Not Exist (Via Message). ... ok                                                                                                                                                          
test_detect_false_via_response_url (tests.all.SherlockDetectTests)                                                                                                                                          
Test Username Does Not Exist (Via Response URL). ... ok                                                                                                                                                     
test_detect_false_via_status_code (tests.all.SherlockDetectTests)                                                                                                                                           
Test Username Does Not Exist (Via Status Code). ... ok                                                                                                                                                      
test_detect_true_via_message (tests.all.SherlockDetectTests)                                                                                                                                                
Test Username Does Exist (Via Message). ... ok                                                                                                                                                              
test_detect_true_via_response_url (tests.all.SherlockDetectTests)                                                                                                                                           
Test Username Does Exist (Via Response URL). ... ok                                                                                                                                                         
test_detect_true_via_status_code (tests.all.SherlockDetectTests)                                                                                                                                            
Test Username Does Exist (Via Status Code). ... ok                                                                                                                                                          
test_coverage_false_via_message (tests.all.SherlockSiteCoverageTests)                                                                                                                                       
Test Username Does Not Exist Site Coverage (Via Error Message). ... test_coverage_false_via_response_url (tests.all.SherlockSiteCoverageTests)                                                              
Test Username Does Not Exist Site Coverage (Via Response URL). ... ok                                                                                                                                       
test_coverage_false_via_status (tests.all.SherlockSiteCoverageTests)                                                                                                                                        
Test Username Does Not Exist Site Coverage (Via HTTP Status). ... skipped "Skipping Username 'noonewouldeverusethis7' available on Site 'Otzovik':  Site returned error status."                            
test_coverage_total (tests.all.SherlockSiteCoverageTests)                                                                                                                                                   
Test Site Coverage Is Total. ... ok                                                                                                                                                                         
test_coverage_true_via_message (tests.all.SherlockSiteCoverageTests)                                                                                                                                        
Test Username Does Exist Site Coverage (Via Error Message). ... test_coverage_true_via_response_url (tests.all.SherlockSiteCoverageTests)                                                                   
Test Username Does Exist Site Coverage (Via Response URL). ... ok                                                                                                                                           
test_coverage_true_via_status (tests.all.SherlockSiteCoverageTests)                                                                                                                                         
Test Username Does Exist Site Coverage (Via HTTP Status). ... skipped "Skipping Username 'blue' claimed on Site 'Otzovik':  Site returned error status."                                                    
                                                                                                                                                                                                            
======================================================================                                                                                                                                      
FAIL: test_coverage_false_via_message (tests.all.SherlockSiteCoverageTests) [Checking Username 'noonewouldeverusethis7' available on Site 'Euw']                                                            
Test Username Does Not Exist Site Coverage (Via Error Message).                                                                                                                                             
----------------------------------------------------------------------                                                                                                                                      
Traceback (most recent call last):                                                                                                                                                                          
  File "/home/asuha/sherlock/sherlock/tests/base.py", line 138, in username_check                                                                                                                           
    result['status'].status)                                                                                                                                                                                
AssertionError: <QueryStatus.AVAILABLE: 'Available'> != <QueryStatus.CLAIMED: 'Claimed'>                                                                                                                    
                                                                                                                                                                                                            
======================================================================                                                                                                                                      
FAIL: test_coverage_false_via_message (tests.all.SherlockSiteCoverageTests) [Checking Username 'noonewouldeverusethis7' available on Site 'EyeEm']
Test Username Does Not Exist Site Coverage (Via Error Message).
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/asuha/sherlock/sherlock/tests/base.py", line 138, in username_check
    result['status'].status)
AssertionError: <QueryStatus.AVAILABLE: 'Available'> != <QueryStatus.CLAIMED: 'Claimed'>

======================================================================
FAIL: test_coverage_false_via_message (tests.all.SherlockSiteCoverageTests) [Checking Username 'noonewouldeverusethis7' available on Site 'Tinder']
Test Username Does Not Exist Site Coverage (Via Error Message).
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/asuha/sherlock/sherlock/tests/base.py", line 138, in username_check
    result['status'].status)
AssertionError: <QueryStatus.AVAILABLE: 'Available'> != <QueryStatus.CLAIMED: 'Claimed'>

======================================================================
FAIL: test_coverage_false_via_message (tests.all.SherlockSiteCoverageTests) [Checking Username 'noonewouldeverusethis7' available on Site 'VirusTotal']
Test Username Does Not Exist Site Coverage (Via Error Message).
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/asuha/sherlock/sherlock/tests/base.py", line 138, in username_check
    result['status'].status)
AssertionError: <QueryStatus.AVAILABLE: 'Available'> != <QueryStatus.CLAIMED: 'Claimed'>

======================================================================
FAIL: test_coverage_false_via_message (tests.all.SherlockSiteCoverageTests) [Checking Username 'noonewouldeverusethis7' available on Site 'Wattpad']
Test Username Does Not Exist Site Coverage (Via Error Message).
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/asuha/sherlock/sherlock/tests/base.py", line 138, in username_check
    result['status'].status)
AssertionError: <QueryStatus.AVAILABLE: 'Available'> != <QueryStatus.CLAIMED: 'Claimed'>

======================================================================
FAIL: test_coverage_false_via_status (tests.all.SherlockSiteCoverageTests) [Checking Username 'noonewouldeverusethis7' available on Site 'Medium']
Test Username Does Not Exist Site Coverage (Via HTTP Status).
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/asuha/sherlock/sherlock/tests/base.py", line 138, in username_check
    result['status'].status)
AssertionError: <QueryStatus.AVAILABLE: 'Available'> != <QueryStatus.CLAIMED: 'Claimed'>

======================================================================
FAIL: test_coverage_true_via_message (tests.all.SherlockSiteCoverageTests) [Checking Username 'blue' claimed on Site 'Repl.it']
Test Username Does Exist Site Coverage (Via Error Message).
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/asuha/sherlock/sherlock/tests/base.py", line 138, in username_check
    result['status'].status)
AssertionError: <QueryStatus.CLAIMED: 'Claimed'> != <QueryStatus.AVAILABLE: 'Available'>

======================================================================
FAIL: test_coverage_true_via_status (tests.all.SherlockSiteCoverageTests) [Checking Username 'blue' claimed on Site 'Oracle Community']
Test Username Does Exist Site Coverage (Via HTTP Status).
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/asuha/sherlock/sherlock/tests/base.py", line 138, in username_check
    result['status'].status)
AssertionError: <QueryStatus.CLAIMED: 'Claimed'> != <QueryStatus.AVAILABLE: 'Available'>

======================================================================
FAIL: test_coverage_true_via_status (tests.all.SherlockSiteCoverageTests) [Checking Username 'blue' claimed on Site 'Vero']
Test Username Does Exist Site Coverage (Via HTTP Status).
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/asuha/sherlock/sherlock/tests/base.py", line 138, in username_check
    result['status'].status)
AssertionError: <QueryStatus.CLAIMED: 'Claimed'> != <QueryStatus.AVAILABLE: 'Available'>

======================================================================
FAIL: test_coverage_true_via_status (tests.all.SherlockSiteCoverageTests) [Checking Username 'red' claimed on Site 'Xbox Gamertag']
Test Username Does Exist Site Coverage (Via HTTP Status).
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/asuha/sherlock/sherlock/tests/base.py", line 138, in username_check
    result['status'].status)
AssertionError: <QueryStatus.CLAIMED: 'Claimed'> != <QueryStatus.AVAILABLE: 'Available'>

======================================================================
FAIL: test_coverage_true_via_status (tests.all.SherlockSiteCoverageTests) [Checking Username 'cupparober' claimed on Site 'Filmogs']
Test Username Does Exist Site Coverage (Via HTTP Status).
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/asuha/sherlock/sherlock/tests/base.py", line 138, in username_check
    result['status'].status)
AssertionError: <QueryStatus.CLAIMED: 'Claimed'> != <QueryStatus.AVAILABLE: 'Available'>

======================================================================
FAIL: test_coverage_true_via_status (tests.all.SherlockSiteCoverageTests) [Checking Username 'adam' claimed on Site 'fixya']
Test Username Does Exist Site Coverage (Via HTTP Status).
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/asuha/sherlock/sherlock/tests/base.py", line 138, in username_check
    result['status'].status)
AssertionError: <QueryStatus.CLAIMED: 'Claimed'> != <QueryStatus.AVAILABLE: 'Available'>

======================================================================
FAIL: test_coverage_true_via_status (tests.all.SherlockSiteCoverageTests) [Checking Username 'green' claimed on Site 'svidbook']
Test Username Does Exist Site Coverage (Via HTTP Status).
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/asuha/sherlock/sherlock/tests/base.py", line 138, in username_check
    result['status'].status)
AssertionError: <QueryStatus.CLAIMED: 'Claimed'> != <QueryStatus.AVAILABLE: 'Available'>

----------------------------------------------------------------------
Ran 13 tests in 387.735s

FAILED (failures=13, skipped=2)
$ python3 sherlock.py noonewouldeverusethis7              
[*] Checking username noonewouldeverusethis7 on:
[+] BuzzFeed: https://buzzfeed.com/noonewouldeverusethis7
[+] Euw: https://euw.op.gg/summoner/userName=noonewouldeverusethis7
[+] EyeEm: https://www.eyeem.com/u/noonewouldeverusethis7
[+] Medium: https://medium.com/@noonewouldeverusethis7
[+] Tinder: https://www.gotinder.com/@noonewouldeverusethis7
[+] VK: https://vk.com/noonewouldeverusethis7
[+] VirusTotal: https://www.virustotal.com/ui/users/noonewouldeverusethis7/trusted_users
[+] Wattpad: https://www.wattpad.com/user/noonewouldeverusethis7

Is this something that hasn’t been intentionally fixed? Should I make PR to fix it?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
hoadlckcommented, Nov 6, 2020

These are all failures because of false positives and false negatives. There may be a few that are happening because an IP address get banned by a given site.

For example, consider the following error message:

FAIL: test_coverage_true_via_status (tests.all.SherlockSiteCoverageTests) [Checking Username 'green' claimed on Site 'svidbook']
Test Username Does Exist Site Coverage (Via HTTP Status).
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/asuha/sherlock/sherlock/tests/base.py", line 138, in username_check
    result['status'].status)
AssertionError: <QueryStatus.CLAIMED: 'Claimed'> != <QueryStatus.AVAILABLE: 'Available'>

The site svidbook should show that username “green” has been claimed. But instead, Sherlock is saying that it is available.

It is also possible that the username which was included in the tests has changed had been registered by someone, or deleted. It takes some research to determine what is what.

1reaction
sdushanthacommented, Nov 6, 2020

@Asuha-a Yes we would have to fix both of them. I dont know much about unit tests, so it might take a while before i get it fixed because I need to find some time to read about it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

unittest — Unit testing framework — Python 3.11.1 ...
python -m unittest -v test_module. When executed without arguments Test Discovery is started: python -m unittest. For a list of all the command-line...
Read more >
Continuing in Python's unittest when an assertion fails
When I fix the model error and re-run the test, then the wheel_count error appears. It would save me time to see both...
Read more >
26.4. unittest — Unit testing framework — Python 3.6.3 ...
python -m unittest -v test_module. When executed without arguments Test Discovery is started: python -m unittest. For a list of all the command-line...
Read more >
Python 3 Testing: An Intro to unittest
The unittest module is actually a testing framework that was originally ... They do not do any error checking and they actually don't...
Read more >
Unit Testing in Python Tutorial - DataCamp
Learn how to test your Python code with unittest. Follow our step-by-step Python unit testing tutorial and bug-proof your code today!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found