Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate getter and setter methods of Computer properties #4252

Merged
merged 1 commit into from
Jul 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .ci/test_plugin_testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def get_computer(cls, temp_dir):
from aiida import orm

computer = orm.Computer(
name='localhost',
label='localhost',
hostname='localhost',
description='my computer',
transport_type='local',
Expand All @@ -80,7 +80,7 @@ def test_computer_loaded(self):
work after resetting the DB.
"""
from aiida import orm
self.assertEqual(orm.Computer.objects.get(name='localhost').uuid, self.computer.uuid)
self.assertEqual(orm.Computer.objects.get(label='localhost').uuid, self.computer.uuid)

def test_tear_down(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion aiida/backends/testimplbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def create_user(self):
def create_computer(self):
"""This method creates and stores a computer."""
self.computer = orm.Computer(
name='localhost',
label='localhost',
hostname='localhost',
transport_type='local',
scheduler_type='pbspro',
Expand Down
8 changes: 4 additions & 4 deletions aiida/manage/tests/pytest_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ def test_1(aiida_localhost):
from aiida.orm import Computer
from aiida.common.exceptions import NotExistent

name = 'localhost-test'
label = 'localhost-test'

try:
computer = Computer.objects.get(name=name)
computer = Computer.objects.get(label=label)
except NotExistent:
computer = Computer(
name=name,
label=label,
description='localhost computer set up by test manager',
hostname=name,
hostname=label,
workdir=temp_dir,
transport_type='local',
scheduler_type='direct'
Expand Down
Loading