diff mbox series

[6/8] VNC Acceptance test: simplify test names

Message ID 20190607152223.9467-7-crosa@redhat.com
State New
Headers show
Series Miscellaneous acceptance test and Travis CI improvements | expand

Commit Message

Cleber Rosa June 7, 2019, 3:22 p.m. UTC
The test name is composed of the class name and method name, so it
looks like there's some redundancy here that we can eliminate.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
 tests/acceptance/vnc.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Wainer dos Santos Moschetta June 10, 2019, 8:28 p.m. UTC | #1
On 06/07/2019 12:22 PM, Cleber Rosa wrote:
> The test name is composed of the class name and method name, so it
> looks like there's some redundancy here that we can eliminate.
>
> Signed-off-by: Cleber Rosa <crosa@redhat.com>
> ---
>   tests/acceptance/vnc.py | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>

>
> diff --git a/tests/acceptance/vnc.py b/tests/acceptance/vnc.py
> index 675fd507ed..d32ae46685 100644
> --- a/tests/acceptance/vnc.py
> +++ b/tests/acceptance/vnc.py
> @@ -45,7 +45,7 @@ class VncUnixSocket(Test):
>           self.socket_dir = tempfile.mkdtemp()
>           self.socket_path = os.path.join(self.socket_dir, 'vnc-socket')
>   
> -    def test_vnc_change_password_requires_a_password(self):
> +    def test_change_password_requires_a_password(self):
>           self.vm.add_args('-nodefaults', '-S',
>                            '-vnc', 'unix:%s' % self.socket_path)
>           self.vm.launch()
> @@ -60,7 +60,7 @@ class VncUnixSocket(Test):
>           self.assertEqual(set_password_response['error']['desc'],
>                            'Could not set password')
>   
> -    def test_vnc_change_password(self):
> +    def test_change_password(self):
>           self.vm.add_args('-nodefaults', '-S',
>                            '-vnc', 'unix:%s,password' % self.socket_path)
>           self.vm.launch()
Philippe Mathieu-Daudé June 14, 2019, 2:18 p.m. UTC | #2
On 6/7/19 5:22 PM, Cleber Rosa wrote:
> The test name is composed of the class name and method name, so it
> looks like there's some redundancy here that we can eliminate.
> 
> Signed-off-by: Cleber Rosa <crosa@redhat.com>
> ---
>  tests/acceptance/vnc.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/acceptance/vnc.py b/tests/acceptance/vnc.py
> index 675fd507ed..d32ae46685 100644
> --- a/tests/acceptance/vnc.py
> +++ b/tests/acceptance/vnc.py
> @@ -45,7 +45,7 @@ class VncUnixSocket(Test):
>          self.socket_dir = tempfile.mkdtemp()
>          self.socket_path = os.path.join(self.socket_dir, 'vnc-socket')
>  
> -    def test_vnc_change_password_requires_a_password(self):
> +    def test_change_password_requires_a_password(self):
>          self.vm.add_args('-nodefaults', '-S',
>                           '-vnc', 'unix:%s' % self.socket_path)
>          self.vm.launch()
> @@ -60,7 +60,7 @@ class VncUnixSocket(Test):
>          self.assertEqual(set_password_response['error']['desc'],
>                           'Could not set password')
>  
> -    def test_vnc_change_password(self):
> +    def test_change_password(self):
>          self.vm.add_args('-nodefaults', '-S',
>                           '-vnc', 'unix:%s,password' % self.socket_path)
>          self.vm.launch()
> 

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
diff mbox series

Patch

diff --git a/tests/acceptance/vnc.py b/tests/acceptance/vnc.py
index 675fd507ed..d32ae46685 100644
--- a/tests/acceptance/vnc.py
+++ b/tests/acceptance/vnc.py
@@ -45,7 +45,7 @@  class VncUnixSocket(Test):
         self.socket_dir = tempfile.mkdtemp()
         self.socket_path = os.path.join(self.socket_dir, 'vnc-socket')
 
-    def test_vnc_change_password_requires_a_password(self):
+    def test_change_password_requires_a_password(self):
         self.vm.add_args('-nodefaults', '-S',
                          '-vnc', 'unix:%s' % self.socket_path)
         self.vm.launch()
@@ -60,7 +60,7 @@  class VncUnixSocket(Test):
         self.assertEqual(set_password_response['error']['desc'],
                          'Could not set password')
 
-    def test_vnc_change_password(self):
+    def test_change_password(self):
         self.vm.add_args('-nodefaults', '-S',
                          '-vnc', 'unix:%s,password' % self.socket_path)
         self.vm.launch()