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)
def test_get_index(self): ok_(UserProfile.get_index(public_index=False), 'bar')
def test_get_index_public(self): ok_(UserProfile.get_index(public_index=True), 'foo')