Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
[LIB-965] update hosting after CORE changes;
  • Loading branch information
opalczynski committed Oct 28, 2016
commit f696613a07da579a56eb430ed2ccbae2870da079
4 changes: 3 additions & 1 deletion syncano/models/hosting.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ class Hosting(Model):
OO wrapper around hosting.
"""

label = fields.StringField(max_length=64, primary_key=True)
name = fields.StringField(max_length=253)
is_default = fields.BooleanField(read_only=True)
is_active = fields.BooleanField(default=True)
description = fields.StringField(read_only=False, required=False)
domains = fields.ListField(default=[])

Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests_hosting.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class HostingIntegrationTests(InstanceMixin, IntegrationTest):

def setUp(self):
self.hosting = self.instance.hostings.create(
label='test12',
name='test12',
description='desc',
domains=['test.test{}.io'.format(uuid.uuid4().hex[:5])]
)
Expand All @@ -30,7 +30,7 @@ def test_create_file(self):

def test_set_default(self):
hosting = self.hosting.set_default()
self.assertIn('default', hosting.domains)
self.assertTrue('default', hosting.is_default)

def test_update_file(self):
a_hosting_file = StringIO()
Expand Down