'Test deleting incomplete add-ons with no public version attached.'

def test_delete_incomplete_with_deleted_version(self):

    app = self.get_app()
    app.current_version.delete()
    eq_(Version.objects.count(), 0)
    eq_(Version.with_deleted.count(), 1)
    app.update(status=0, highest_status=0)
    app.update_version()
    eq_(app.latest_version, None)
    eq_(app.current_version, None)
    app.delete()
    eq_(len(mail.outbox), 1)
    eq_(Webapp.objects.count(), 0)
    eq_(Webapp.with_deleted.count(), 1)
