mirror of
https://github.com/unode/firefox_decrypt.git
synced 2025-12-16 12:01:52 +01:00
🧪 Add tests for Firefox 144 - failing unless on 144+
This commit is contained in:
28
tests/csv.t
28
tests/csv.t
@@ -144,6 +144,34 @@ class TestCSV(unittest.TestCase):
|
||||
output = lib.run(cmd, stdin=self.pwd)
|
||||
self.validate_vertbar(output)
|
||||
|
||||
def test_firefox_144_default(self):
|
||||
test = os.path.join(self.test, "test_profile_firefox_144")
|
||||
|
||||
cmd = lib.get_script() + [test, "--format", "csv"]
|
||||
output = lib.run(cmd, stdin=self.pwd)
|
||||
self.validate_default(output)
|
||||
|
||||
def test_firefox_144_tabular(self):
|
||||
test = os.path.join(self.test, "test_profile_firefox_144")
|
||||
|
||||
cmd = lib.get_script() + [test, "--format", "tabular"]
|
||||
output = lib.run(cmd, stdin=self.pwd)
|
||||
self.validate_tabular(output)
|
||||
|
||||
def test_firefox_144_semicol(self):
|
||||
test = os.path.join(self.test, "test_profile_firefox_144")
|
||||
|
||||
cmd = lib.get_script() + [test, "--format", "csv", "--csv-delimiter", ";", "--csv-quotechar", "'"]
|
||||
output = lib.run(cmd, stdin=self.pwd)
|
||||
self.validate_semicol(output)
|
||||
|
||||
def test_firefox_144_vertbar(self):
|
||||
test = os.path.join(self.test, "test_profile_firefox_144")
|
||||
|
||||
cmd = lib.get_script() + [test, "--format", "csv", "--csv-delimiter", "\t", "--csv-quotechar", "|"]
|
||||
output = lib.run(cmd, stdin=self.pwd)
|
||||
self.validate_vertbar(output)
|
||||
|
||||
@unittest.skipIf(lib.platform == "Windows",
|
||||
"Windows DLL isn't backwards compatible")
|
||||
def test_firefox_nopassword_46_default(self):
|
||||
|
||||
@@ -52,6 +52,11 @@ class TestDirectProfilePass(unittest.TestCase):
|
||||
"test_profile_firefox_59")
|
||||
self.run_firefox_with_password()
|
||||
|
||||
def test_firefox_144(self):
|
||||
self.test = os.path.join(lib.get_test_data(),
|
||||
"test_profile_firefox_144")
|
||||
self.run_firefox_with_password()
|
||||
|
||||
def test_firefox_non_ascii(self):
|
||||
self.test = os.path.join(lib.get_test_data(),
|
||||
"test_profile_firefox_LЮшр/")
|
||||
|
||||
@@ -51,6 +51,13 @@ class TestJSON(unittest.TestCase):
|
||||
output = lib.run(cmd, stdin=self.pwd, stderr=sys.stderr)
|
||||
self.validate_default(output)
|
||||
|
||||
def test_firefox_144_default(self):
|
||||
test = os.path.join(self.test, "test_profile_firefox_144")
|
||||
|
||||
cmd = lib.get_script() + [test, "--format", "json"]
|
||||
output = lib.run(cmd, stdin=self.pwd, stderr=sys.stderr)
|
||||
self.validate_default(output)
|
||||
|
||||
@unittest.skipIf(lib.platform == "Windows",
|
||||
"Windows DLL isn't backwards compatible")
|
||||
def test_firefox_nopassword_46_default(self):
|
||||
|
||||
@@ -42,6 +42,10 @@ class TestSingleProfile(unittest.TestCase):
|
||||
self.output_data = "list_single_59"
|
||||
self.listing_from_single_profile()
|
||||
|
||||
def test_firefox_144(self):
|
||||
self.test_profile = "test_profile_firefox_144"
|
||||
self.output_data = "list_single_144"
|
||||
self.listing_from_single_profile()
|
||||
|
||||
if __name__ == "__main__":
|
||||
from simpletap import TAPTestRunner
|
||||
|
||||
@@ -43,6 +43,13 @@ class TestNonInteractiveChoice(unittest.TestCase):
|
||||
out = lib.run(cmd, stdin=pwd)
|
||||
self.validate(out)
|
||||
|
||||
def test_firefox_144(self):
|
||||
cmd = lib.get_script() + [lib.get_test_data(), "-nc", "7"]
|
||||
pwd = lib.get_password()
|
||||
|
||||
out = lib.run(cmd, stdin=pwd)
|
||||
self.validate(out)
|
||||
|
||||
@unittest.skipIf(lib.platform == "Windows",
|
||||
"Windows DLL isn't backwards compatible")
|
||||
def test_firefox_nopass_46(self):
|
||||
|
||||
@@ -50,6 +50,14 @@ class TestProfileIni(unittest.TestCase):
|
||||
output = lib.run(cmd, stdin=payload)
|
||||
self.validate(output)
|
||||
|
||||
def test_firefox_144(self):
|
||||
cmd = lib.get_script() + [self.test]
|
||||
choice = "7"
|
||||
payload = '\n'.join((choice, self.pwd))
|
||||
|
||||
output = lib.run(cmd, stdin=payload)
|
||||
self.validate(output)
|
||||
|
||||
def test_firefox_non_ascii(self):
|
||||
cmd = lib.get_script() + [self.test]
|
||||
choice = "5"
|
||||
|
||||
3
tests/test_data/outputs/list_single_144.output
Normal file
3
tests/test_data/outputs/list_single_144.output
Normal file
@@ -0,0 +1,3 @@
|
||||
- WARNING - profile.ini not found in test_data/test_profile_firefox_59
|
||||
- WARNING - Continuing and assuming 'test_data/test_profile_firefox_59' is a profile location
|
||||
- ERROR - Listing single profiles not permitted.
|
||||
@@ -1,3 +1,3 @@
|
||||
- WARNING - profile.ini not found in test_data/test_profile_firefox_59
|
||||
- WARNING - Continuing and assuming 'test_data/test_profile_firefox_59' is a profile location
|
||||
- WARNING - profile.ini not found in test_data/test_profile_firefox_144
|
||||
- WARNING - Continuing and assuming 'test_data/test_profile_firefox_144' is a profile location
|
||||
- ERROR - Listing single profiles not permitted.
|
||||
|
||||
Reference in New Issue
Block a user