This repository has been archived by the owner on Aug 20, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 793764 - Mozmill adds collected addons as string but not as list …
…to the report. r=jhammel
- Loading branch information
Showing
5 changed files
with
87 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import os | ||
import unittest | ||
import tempfile | ||
|
||
import mozmill | ||
|
||
|
||
class ModuleTest(unittest.TestCase): | ||
def make_test(self): | ||
"""make an example test to run""" | ||
test = """var test_something = function() {}""" | ||
fd, path = tempfile.mkstemp() | ||
os.write(fd, test) | ||
os.close(fd) | ||
|
||
return path | ||
|
||
def test_appinfo(self): | ||
tests = [{'path': self.make_test()}] | ||
|
||
m = mozmill.MozMill.create() | ||
m.run(tests) | ||
results = m.finish() | ||
|
||
self.assertRegexpMatches(results.appinfo.get('application_id'), "^{.*}$") | ||
self.assertIsInstance(results.appinfo.get('application_name'), unicode) | ||
self.assertIsInstance(results.appinfo.get('application_version'), unicode) | ||
self.assertIsInstance(results.appinfo.get('application_locale'), unicode) | ||
self.assertRegexpMatches(results.appinfo.get('platform_buildid'), "^[0-9]*$") | ||
self.assertIsInstance(results.appinfo.get('application_version'), unicode) | ||
self.assertIsInstance(results.appinfo.get('startupinfo'), dict) | ||
|
||
addons = results.appinfo.get('addons') | ||
self.assertIsInstance(addons, list) | ||
self.assertGreaterEqual(len(addons), 2, | ||
"At least Mozmill and JSBridge should be installed.") | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters