The goal of this test is to ensure utils.notify_socket returns the correct None values when NOTIFY_SOCKET is not set. However, mock.patch.dict by default only adds to the in_dict, it doesn't clear it. This test passed up until now just by concidence of NOTIFY_SOCKET not being set in Travis or in RPM mock (not the same thing as python mock) builds. RPM mock now using systemd-nspawn, which sets NOTIFY_SOCKET, exposing the flaw.
The goal of this test is to ensure utils.notify_socket returns the correct None values when NOTIFY_SOCKET is not set. However, mock.patch.dict by default only adds to the in_dict, it doesn't clear it. This test passed up until now just by concidence of NOTIFY_SOCKET not being set in Travis or in RPM mock (not the same thing as python mock) builds. RPM mock now using systemd-nspawn, which sets NOTIFY_SOCKET, exposing the flaw.