'Make sure the startproject management command validates a project name'

def test_invalid_project_name(self):

    for bad_name in ('7testproject', '../testproject'):
        args = ['startproject', bad_name]
        testproject_dir = os.path.join(self.test_dir, bad_name)
        self.addCleanup(shutil.rmtree, testproject_dir, True)
        (out, err) = self.run_django_admin(args)
        self.assertOutput(err, ("Error:    '%s'    is    not    a    valid    project    name.    Please    make    sure    the    name    is    a    valid    identifier." % bad_name))
        self.assertFalse(os.path.exists(testproject_dir))
