Exemplo n.º 1
0
    def test_migrate(self):
        migrator = AccountMigrator(
            destination_directory = self.dst_dir,
            source_account = self.account,
            source_password = '******',
        )

        copied_account = migrator.migrate()
        copied_custom_data = copied_account.custom_data

        self.assertEqual(copied_account.username, self.account.username)
        self.assertEqual(copied_account.given_name, self.account.given_name)
        self.assertEqual(copied_account.middle_name, self.account.middle_name)
        self.assertEqual(copied_account.surname, self.account.surname)
        self.assertEqual(copied_account.email, self.account.email)
        self.assertEqual(copied_account.status, self.account.status)
        self.assertEqual(copied_custom_data['hi'], 'there')