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)
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)
def test_correct_format(self, req, includes): """All format variables should be present """ MQTTRequest(Mock(), req, includes)