def METHOD_NAME(self):
    # new format
    self.write_file(self.rc, PYPIRC)
    dist = Distribution()
    cmd = upload(dist)
    cmd.finalize_options()
    for attr, waited in (
        ('username', 'me'),
        ('password', 'secret'),
        ('realm', 'pypi'),
        ('repository', 'https://upload.pypi.org/legacy/'),
    ):
        assert getattr(cmd, attr) == waited