def test_unmask_right_message(self): # Unmasking picks the right message, and doesn't try to violate # the unique constraint on is_current_upstream. inactive = self.factory.makeSuggestion(self.pofile, self.potmsgset) remove_translations(ids=[self.ubuntu.id]) Store.of(self.upstream).autoreload() self.assertTrue(self.upstream.is_current_ubuntu) self.assertFalse(inactive.is_current_ubuntu)
def test_unmask_upstream_message(self): # Basic use case: upstream message is unmasked. remove_translations(ids=[self.ubuntu.id]) Store.of(self.upstream).autoreload() self.assertTrue(self.upstream.is_current_upstream) self.assertTrue(self.upstream.is_current_ubuntu)
def _removeMessages(self, **kwargs): """Front-end for `remove_translations`. Flushes changes first.""" Store.of(self.potemplate).flush() return remove_translations(**kwargs)