#1149 closed defect (fixed)

scripts/webopen.py is not tested

Reported by: davidsarah Owned by: davidsarah
Priority: major Milestone: 1.9.0
Component: code-frontend-cli Version: 1.7.1
Keywords: tahoe-webopen easy reviewed Cc:
Launchpad Bug:

Description

http://tahoe-lafs.org/codecoverage/tahoe-lafs/zomp/htmlcov-allmydata-tahoe-1.7.1-r4630/src_allmydata_scripts_tahoe_webopen.html

We shouldn't try to actually open a webbrowser when running the test suite, but we could mock webbrowser.open and check that it is called with the right URL.

Attachments (1)

test-for-webopen.darcs.patch (17.8 KB) - added by davidsarah at 2011-07-24T22:15:34Z.
Add test for webopen. fixes #1149

Download all attachments as: .zip

Change History (8)

comment:1 Changed at 2010-08-02T19:24:30Z by davidsarah

  • Keywords tahoe-webopen easy added

Changed at 2011-07-24T22:15:34Z by davidsarah

Add test for webopen. fixes #1149

comment:2 Changed at 2011-07-24T22:16:08Z by davidsarah

  • Keywords review-needed added; test-needed removed
  • Milestone changed from soon to 1.9.0

comment:3 Changed at 2011-08-01T02:52:14Z by nejucomo

  • Owner set to nejucomo
  • Status changed from new to assigned

comment:4 Changed at 2011-08-01T05:59:23Z by nejucomo

I read over the patch and understand the implementation.

After applying the patch I can successfully run:

$ python ./setup.py test --suite allmydata.test.test_cli.Webopen

-after many messages about dependency management, the actual tests succeed and look like this:

allmydata.test.test_cli
  Webopen
    test_webopen ...                                                       [OK]
    test_webopen_with_nonexistent_alias ...                                [OK]

-------------------------------------------------------------------------------
Ran 2 tests in 0.664s

PASSED (successes=2)

I therefore consider this patch good to merge because it only adds a unittest, which successfully passes, and which does not launch my webbrowser.

comment:5 Changed at 2011-08-01T06:02:22Z by nejucomo

  • Keywords reviewed added; review-needed removed
  • Owner changed from nejucomo to davidsarah
  • Status changed from assigned to new

comment:6 Changed at 2011-08-11T00:17:46Z by david-sarah@…

  • Resolution set to fixed
  • Status changed from new to closed

In 6c2670641e26e8ca:

Add test for webopen. fixes #1149

comment:7 Changed at 2011-08-11T02:42:08Z by david-sarah@…

In [5174/ticket393-MDMF-2]:

Add test for webopen. fixes #1149

Note: See TracTickets for help on using tickets.