Exemple #1
0
 def test_max_fetch_value_failure(self, mocker):
     """
     Tests max_fetch parameter failure scenario.
     """
     from Flashpoint import test_module
     with pytest.raises(ValueError) as error2:
         test_module(self.client, {"isFetch": True, "max_fetch": "a"})
     assert str(error2.value) == '"a" is not a valid number'
Exemple #2
0
 def test_first_fetch_failure(self, mocker):
     """
     Tests first_fetch parameter failure scenario.
     """
     from Flashpoint import test_module
     with pytest.raises(ValueError) as error3:
         test_module(self.client, {"isFetch": True, "first_fetch": "abc"})
     assert str(error3.value) == INVALID_DATE_MESSAGE
Exemple #3
0
 def test_max_fetch_limit_failure(self, mocker):
     """
     Tests max_fetch parameter failure scenario.
     """
     from Flashpoint import test_module
     with pytest.raises(ValueError) as error1:
         test_module(self.client, {"isFetch": True, "max_fetch": 0})
     assert str(error1.value) == MESSAGES["INVALID_MAX_FETCH"].format(0)
 def test_test_module(self, mocker):
     """Test test_module."""
     from Flashpoint import test_module
     test_module(client=self.client, params={})