'Create the first translation of a doc to new locale.'

@mock.patch.object(EditDocumentEvent, 'fire')
@mock.patch.object(Site.objects, 'get_current')
def test_first_translation_to_locale(self, get_current, edited_fire):

    get_current.return_value.domain = 'testserver'
    translate_uri = self._translate_uri()
    data = _translation_data()
    response = self.client.post(translate_uri, data)
    eq_(302, response.status_code)
    new_doc = Document.objects.get(slug=data['slug'])
    eq_('es', new_doc.locale)
    eq_(data['title'], new_doc.title)
    eq_(self.d, new_doc.parent)
    rev = new_doc.revisions.all()[0]
    eq_(data['keywords'], rev.keywords)
    eq_(data['summary'], rev.summary)
    eq_(data['content'], rev.content)
    ok_(edited_fire.called)
