コード例 #1
0
ファイル: android_test.py プロジェクト: CodingDog/mercury
    def testItShouldNotBeValidIfNoActionOrComponentIsSet(self):
        reflector = IntentTestCase.MockReflector()
        reflector.construct_returns = ReflectedObject(999, reflector=reflector)
        module = IntentTestCase.MockModule(reflector)

        intent = Intent()
        
        assert not intent.isValid()
コード例 #2
0
ファイル: android_test.py プロジェクト: CodingDog/mercury
    def testItShouldBeValidIfTheComponentIsSet(self):
        reflector = IntentTestCase.MockReflector()
        reflector.construct_returns = ReflectedObject(999, reflector=reflector)
        module = IntentTestCase.MockModule(reflector)

        intent = Intent(component="com.android.browser com.android.browser.BrowserActivity")
        
        assert intent.isValid()
コード例 #3
0
ファイル: android_test.py プロジェクト: CodingDog/mercury
    def testItShouldBeValidIfTheActionIsSet(self):
        reflector = IntentTestCase.MockReflector()
        reflector.construct_returns = ReflectedObject(999, reflector=reflector)
        module = IntentTestCase.MockModule(reflector)

        intent = Intent(action="android.intent.action.VIEW")
        
        assert intent.isValid()
コード例 #4
0
ファイル: android_test.py プロジェクト: 4cce1er/drozer-py3
    def testItShouldNotBeValidIfNoActionOrComponentIsSet(self):
        reflector = IntentTestCase.MockReflector()
        reflector.construct_returns = ReflectedObject(999, reflector=reflector)
        module = IntentTestCase.MockModule(reflector)

        intent = Intent()

        assert not intent.isValid()
コード例 #5
0
ファイル: android_test.py プロジェクト: 4cce1er/drozer-py3
    def testItShouldBeValidIfTheActionIsSet(self):
        reflector = IntentTestCase.MockReflector()
        reflector.construct_returns = ReflectedObject(999, reflector=reflector)
        module = IntentTestCase.MockModule(reflector)

        intent = Intent(action="android.intent.action.VIEW")

        assert intent.isValid()
コード例 #6
0
ファイル: android_test.py プロジェクト: 4cce1er/drozer-py3
    def testItShouldBeValidIfTheComponentIsSet(self):
        reflector = IntentTestCase.MockReflector()
        reflector.construct_returns = ReflectedObject(999, reflector=reflector)
        module = IntentTestCase.MockModule(reflector)

        intent = Intent(
            component="com.android.browser com.android.browser.BrowserActivity"
        )

        assert intent.isValid()