def test_removal_from_public_index(self):
        """Test that a user gets removed from public index if makes
        profile mozillians only again.

        """
        before = (S(UserProfile)
                  .indexes(UserProfile.get_index(public_index=True))
                  .count())
        profile = self.mozillian2.userprofile
        profile.privacy_full_name = MOZILLIANS
        profile.save()
        sleep(1)
        after = (S(UserProfile)
                 .indexes(UserProfile.get_index(public_index=True))
                 .count())
        eq_(after+1, before)
示例#2
0
 def test_get_index(self):
     ok_(UserProfile.get_index(public_index=False), 'bar')
示例#3
0
 def test_get_index_public(self):
     ok_(UserProfile.get_index(public_index=True), 'foo')
示例#4
0
 def test_get_index(self):
     ok_(UserProfile.get_index(public_index=False), 'bar')
示例#5
0
 def test_get_index_public(self):
     ok_(UserProfile.get_index(public_index=True), 'foo')