def test_create_db(self):
        self.main_db_entity.delete()

        self.main_vcs_entity.key = 'string-key'
        self.main_vcs_entity.comments = ['first comment', 'second']
        self.main_vcs_entity.order = 7
        self.main_vcs_translation.fuzzy = False
        self.main_vcs_entity.string_plural = 'plural string'
        self.main_vcs_entity.source = ['foo.py:87']

        self.changeset.create_db_entity(self.main_vcs_entity)
        self.changeset.execute()
        new_entity = Entity.objects.get(
            resource__path=self.main_vcs_resource.path,
            string=self.main_vcs_entity.string
        )
        assert_attributes_equal(
            new_entity,
            resource=self.main_db_resource,
            string='Source String',
            key='string-key',
            comment='first comment\nsecond',
            order=7,
            string_plural='plural string',
            source=['foo.py:87'],
        )

        new_translation = new_entity.translation_set.all()[0]
        assert_attributes_equal(
            new_translation,
            locale=self.translated_locale,
            string='Translated String',
            plural_form=None,
            approved=True,
            approved_date=aware_datetime(1970, 1, 1),
            fuzzy=False
        )
Create new entity in the database.
dataset/ETHPy150Open mozilla/pontoon/pontoon/sync/tests/test_changeset.py/ChangeSetTests.test_create_db