点击"Unittest for test_post_API.testClass"按钮,点击”Edit configuration...“,弹出对话框Run/Debug configurations.

点左侧绿色“+”,选择python tests,选择unittests。

右侧选择configuration标签,Target选择Python,输入“py文件名.文件中定义的类名”例如test_post_API.testClass.

据本人以为,提示“AttributeError: type object 'testClass' has no attribute 'testMothod'”错误,可能是由于配置错误(如:test_post_API.testClass.testMothod)导致。

AttributeError: type object 'testClass' has no attribute 'testMothod'的更多相关文章

  1. ddt运行测试方法时报错AttributeError: type object 'TestHttpRq' has no attribute 'test_http_rq_login'

    import unittest import ddt #装饰器 from ddt import ddt,data,unpack #导入ddt中的各个模块 from homework.unittest_ ...

  2. AttributeError type object 'deprecated' has no attribute 'ROCKY'

    AttributeError type object 'deprecated' has no attribute 'ROCKY' 在使用kolla安装docker的时候遇到了AttributeErro ...

  3. ddt运行报错AttributeError: type object 'TestLogin' has no attribute 'test_login'

    源代码: #!usr/bin/python3 # -*- coding:utf-8 -*- # @Time: 2018/12/17 下午2:07 # @File: do_excel.py # @Sof ...

  4. Rasa init报错:AttributeError: type object 'Callable' has no attribute '_abc_registry'

    错误:Rasa init --no-prompt 报错 原因:Python升级到3.7后会遇到该问题 解决:pip uninstall typing

  5. AttributeError: type object '_io.StringIO' has no attribute 'StringIO'

    python2导入StringIO模块,直接: from StringIO import StringIO 对于python3,StringIO和cStringIO模块已经没了,如果要使用的话,需要导 ...

  6. 重写用户模型时报错AttributeError: type object ‘自定义类’ has no attribute ‘USERNAME_FIELD’

    view中导入:from django.contrib.auth.models import AbstractBaseUser settings.py中设置了:AUTH_USER_MODEL='app ...

  7. Python - celery 相关报错 - AttributeError: type object '_multiprocessing.win32' has no attribute 'WAIT_OBJECT_0'

    报错场景 执行   celery worker -A tasks -l INFO  打开 worker 的时候报错无法进行 报错解决 Celery 的版本过高, 进行降级处理即可 pip instal ...

  8. AttributeError: 'WebElement' object has no attribute 'send_keys'

    这个是没问题的代码:用来打开谷歌搜索cheese并退出 from selenium import webdriver from selenium.common.exceptions import Ti ...

  9. 解决:pipenv shell报错:AttributeError: 'module' object has no attribute 'run'

    利用pipenv shell切换到虚拟环境时,显示报错:AttributeError: 'module' object has no attribute 'run' 可以看到是d:\program\p ...

随机推荐

  1. 使用插件和不使用插件实现select的框

    # 1.select框单选 # 方式1 select1 = fields.ChoiceField( choices=[ (1,"select框方式1_1"), (2,"s ...

  2. python中logging模块使用

    1.logging模块使用场景 在写程序的时候,尤其是大型的程序,在程序中加入日志系统是必不可少的,它能记录很多的信息.刚刚接触python的时候肯定都在用print来输出信息,这样是最简单的输出,正 ...

  3. 集成bug统计链接

    http://crab.baidu.com/http://bugly.qq.com/ http://bughd.com/ http://www.umeng.com/analyticshttp://tr ...

  4. android显示通知栏Notification以及自定义Notification的View

    遇到的最大的问题是监听不到用户清除通知栏的广播.所以是不能监听到的. 自定义通知栏的View,然后service运行时更改notification的信息. /** * Show a notificat ...

  5. asp.net core webapi 日期返回中出现字母T

    全局配置 在Startup文件中修改 // This method gets called by the runtime. Use this method to add services to the ...

  6. “windows的批处理”与“Linux的shell script”的类比学习

    从2005年开始,做了将近10年的系统维护,先是做网络接入管理,然后做网络安全与审计,然后做服务器管理等整个网络系统的运营管理:现在又兼着做一些Linux下的视频监控系统的软硬件维护.过程中遇到太多重 ...

  7. C#百度图片识别API调用返回数据包解析

    百度图片识别api接口 public static JObject GeneralBasic(string apikey,string secretkey,string path) { var cli ...

  8. 17.Mysql分区

    17.Mysql分区分区是指根据一定的规则把一个表分解成多个部分,逻辑上仍是一张表,实际上由多个物理分区对象组成.分区对于应用是完全透明的,不影响业务逻辑和SQL编写.分区的优点: 可以存储更多的数据 ...

  9. python添加fluent日志记录-aop

    python添加fluent日志,aop实现 1.配置fluent相关信息 fluent_config.ini fluent_config.ini [fluent.aop] #is support f ...

  10. linux通过speedtest-cli测试服务器网速

    1.git clone speedtest源码 git clone https://github.com/sivel/speedtest-cli.git 2.运行speedtest.py cd spe ...