def testWithoutFlag(self, mock):
        play_env = self.common.copy()

        play_app = PlayApplication('fake', play_env, True)
        play_app.java_cmd([])

        step('Assert getJavaVersion was called once')
        self.assert_(mock.called)
    def testWithoutFlag(self, mock):
        play_env = self.common.copy()

        play_app = PlayApplication('fake', play_env, True)
        play_app.java_cmd([])

        step('Assert getJavaVersion was called once')
        self.assert_(mock.called)
    def testWithFlag(self, mock):
        play_env = self.common.copy()
        # pass the jvm_version flag in
        play_env.update({'jvm_version': '42'})

        play_app = PlayApplication('fake', play_env, True)
        play_app.java_cmd([])

        step('Assert getJavaVersion was not called')
        self.assert_(not mock.called)
    def testWithFlag(self, mock):
        play_env = self.common.copy()
        # pass the jvm_version flag in
        play_env.update({'jvm_version': '42'})

        play_app = PlayApplication('fake', play_env, True)
        play_app.java_cmd([])

        step('Assert getJavaVersion was not called')
        self.assert_(not mock.called)