Skip to content

Commit

Permalink
Add .asset assertions for integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Walsh committed Nov 9, 2018
1 parent efbb39e commit be78168
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ def test_integration_outputs_created(self):
if not sys.platform.startswith('win'):
self.assertTrue(os.path.isfile(j(self.dest_tmpdir, 'test',
'tree.txt')))
# bootstrap css/js
self.assertTrue(is_non_zero_file(j(self.dest_tmpdir, 'test',
'.assets', 'css', 'bootstrap.min.css')))
self.assertTrue(is_non_zero_file(j(self.dest_tmpdir, 'test',
'.assets', 'js', 'bootstrap.min.js')))
self.assertTrue(is_non_zero_file(j(self.dest_tmpdir, 'test',
'.assets', 'js', 'jquery-3.3.1.slim.min.js')))
self.assertTrue(is_non_zero_file(j(self.dest_tmpdir, 'test',
'.assets', 'js', 'popper.min.js')))


def test_integration_outputs_created_diskimage(self):
subprocess.call('python brunnhilde.py -nd ./test-data/diskimages/sample-floppy-fat.dd "%s" test' % (self.dest_tmpdir),
Expand Down Expand Up @@ -167,8 +177,18 @@ def test_integration_save_load_assets(self):
shell=True)
subprocess.call('python brunnhilde.py --load_assets "%s" ./test-data/files/ "%s" load-test' % (assets_dir, self.dest_tmpdir),
shell=True)
# report
self.assertTrue(is_non_zero_file(j(self.dest_tmpdir, 'load-test',
'report.html')))
# bootstrap css/js
self.assertTrue(is_non_zero_file(j(self.dest_tmpdir, 'load-test',
'.assets', 'css', 'bootstrap.min.css')))
self.assertTrue(is_non_zero_file(j(self.dest_tmpdir, 'load-test',
'.assets', 'js', 'bootstrap.min.js')))
self.assertTrue(is_non_zero_file(j(self.dest_tmpdir, 'load-test',
'.assets', 'js', 'jquery-3.3.1.slim.min.js')))
self.assertTrue(is_non_zero_file(j(self.dest_tmpdir, 'load-test',
'.assets', 'js', 'popper.min.js')))


if __name__ == '__main__':
Expand Down

0 comments on commit be78168

Please sign in to comment.