~maas-committers/maas/trunk

« back to all changes in this revision

Viewing changes to src/maasserver/models/tests/test_node.py

  • Committer: MAAS Lander
  • Author(s): Lee Trager
  • Date: 2016-05-25 22:00:47 UTC
  • mfrom: (5029.4.6 round_ram)
  • Revision ID: maas_lander-20160525220047-nzwo9ap2643gsovk
[r=trapnine][bug=1585759,1585760][author=ltrager] Allow refreshing and import images on rack controllers via the UI and show memory to the first decimal place

Show diffs side-by-side

added added

removed removed

Lines of Context:
578
578
        self.assertEqual('0.5', node.display_memory())
579
579
 
580
580
    def test_display_memory_returns_value_divided_by_1024(self):
581
 
        node = factory.make_Node(memory=2048)
582
 
        self.assertEqual('2', node.display_memory())
 
581
        node = factory.make_Node(memory=2560)
 
582
        self.assertEqual('2.5', node.display_memory())
583
583
 
584
584
    def test_physicalblockdevice_set_returns_physicalblockdevices(self):
585
585
        node = factory.make_Node(with_boot_disk=False)