Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
 def test_get_index(self):
     ok_(UserProfile.get_index(public_index=False), 'bar')
Ejemplo n.º 3
0
 def test_get_index_public(self):
     ok_(UserProfile.get_index(public_index=True), 'foo')
Ejemplo n.º 4
0
 def test_get_index(self):
     ok_(UserProfile.get_index(public_index=False), 'bar')
Ejemplo n.º 5
0
 def test_get_index_public(self):
     ok_(UserProfile.get_index(public_index=True), 'foo')