Пример #1
0
  def test_get_notification_data(self, get_filter_data):
    """ Test that data does not contain empty emails """

    get_filter_data.return_value = {
        "*****@*****.**": {},
        "": {},
    }
    notification_data = common.get_notification_data([1, 2])
    self.assertIn("*****@*****.**", notification_data)
    self.assertNotIn("", notification_data)
Пример #2
0
    def test_get_notification_data(self, get_filter_data, ca_cache,
                                   *cache_mocks):
        """ Test that data does not contain empty emails """
        ca_cache.return_value = None
        for cache_func in cache_mocks:
            cache_func.return_value = {}

        get_filter_data.return_value = {
            "*****@*****.**": {},
            "": {},
        }
        notification_data = common.get_notification_data([1, 2])
        self.assertIn("*****@*****.**", notification_data)
        self.assertNotIn("", notification_data)