Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
EliasBoulharts authored and Sispheor committed Aug 16, 2021
1 parent ddb8fe4 commit a76ddd1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions resource_tracker/tests/test_resource_group_resource_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ def test_resource_group_resource_create_non_integer_value(self):
response = self.client.post(url, data=data)
self.assertEquals(200, response.status_code)

self.assertEqual(0,self.rg_physical_servers.resources.filter(name='new_resource').count())
self.assertEqual(0, self.rg_physical_servers.resources.filter(name='new_resource').count())

def test_resource_group_resource_create_negative_value(self):
arg = {
"resource_group_id": self.rg_physical_servers.id
Expand All @@ -97,13 +98,13 @@ def test_resource_group_resource_create_negative_value(self):
# test POST
data = {
"name": "new_resource",
"CPU": "eee",
"Memory": ""
"CPU": "0",
"Memory": "-12"
}
response = self.client.post(url, data=data)
self.assertEquals(200, response.status_code)

self.assertEqual(0,self.rg_physical_servers.resources.filter(name='new_resource').count())
self.assertEqual(0, self.rg_physical_servers.resources.filter(name='new_resource').count())

def test_resource_group_resource_create(self):
arg = {
Expand Down Expand Up @@ -153,7 +154,8 @@ def test_resource_group_resource_edit(self):
resource_to_edit.refresh_from_db()
self.assertEquals(resource_to_edit.name, "updated_name")

resource_attribute_cpu = ResourceAttribute.objects.get(resource=resource_to_edit, attribute_type=self.rg_physical_servers_cpu_attribute)
resource_attribute_cpu = ResourceAttribute.objects.get(resource=resource_to_edit,
attribute_type=self.rg_physical_servers_cpu_attribute)
self.assertEquals(resource_attribute_cpu.value, 1)

resource_attribute_memory = ResourceAttribute.objects.get(resource=resource_to_edit,
Expand Down
2 changes: 1 addition & 1 deletion templates/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
</li>
<li class="nav-item">
<a href="{% url 'service_catalog:announcement_list'%}" class="nav-link {% if '/announcement/' in request.path %}active{% endif %}">
<i class="fas fa-bullhorn"></i>
<i class="nav-icon fas fa-bullhorn"></i>
<p>Announcements</p>
</a>
</li>
Expand Down

0 comments on commit a76ddd1

Please sign in to comment.