예제 #1
0
    def test_remove_duplicates_true(self):
        result = utils.subscriptions_users_remove_duplicates(self.emails_1,
                                                             self.emails_1,
                                                             remove_same=True)

        assert set(result['none']) == set(['h1234', 'g1234', 'i1234'])
        assert result['email_digest'] == []
        assert result['email_transactional'] == []
예제 #2
0
 def test_remove_duplicates(self):
     result = utils.subscriptions_users_remove_duplicates(self.emails_1,
                                                          self.emails_4,
                                                          remove_same=False)
     assert set(self.dup_1_3['email_transactional']) == set(
         result['email_transactional'])
     assert set(self.dup_1_3['none']) == set(result['none'])
     assert set(self.dup_1_3['email_digest']) == set(result['email_digest'])
예제 #3
0
 def test_remove_duplicates_true(self):
     result = utils.subscriptions_users_remove_duplicates(self.emails_1,
                                                          self.emails_1,
                                                          remove_same=True)
     assert_equal(
         {
             email_digest: [],
             email_transactional: [],
             'none': ['h1234', 'g1234', 'i1234']
         }, result)
예제 #4
0
 def test_remove_duplicates(self):
     result = utils.subscriptions_users_remove_duplicates(self.emails_1,
                                                          self.emails_4,
                                                          remove_same=False)
     assert_equal(self.dup_1_3, result)
예제 #5
0
파일: test_events.py 프로젝트: hmoco/osf.io
 def test_remove_duplicates_true(self):
     result = utils.subscriptions_users_remove_duplicates(
         self.emails_1, self.emails_1, remove_same=True
     )
     assert_equal({email_digest: [], email_transactional: [], 'none': ['h1234', 'g1234', 'i1234']}, result)
예제 #6
0
파일: test_events.py 프로젝트: hmoco/osf.io
 def test_remove_duplicates(self):
     result = utils.subscriptions_users_remove_duplicates(
         self.emails_1, self.emails_4, remove_same=False
     )
     assert_equal(self.dup_1_3, result)