def test_complete_build(self, finish): site = self.factory.make_site() args = mock.Mock(site=site.path, outdir='.') command = BuildCommand() command.run(args) self.assertTrue(finish.called)