Esempio n. 1
0
    def test_missing_format(self, req, includes):
        """All format variables should be present
        """
        del includes["variables"]["request_topic"]

        with pytest.raises(exceptions.MissingFormatError):
            MQTTRequest(Mock(), req, includes)
Esempio n. 2
0
    def test_unknown_fields(self, req, includes):
        """Unkown args should raise an error
        """
        req["fodokfowe"] = "Hello"

        with pytest.raises(exceptions.UnexpectedKeysError):
            MQTTRequest(Mock(), req, includes)
Esempio n. 3
0
 def test_correct_format(self, req, includes):
     """All format variables should be present
     """
     MQTTRequest(Mock(), req, includes)